473,508 Members | 2,489 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

what is the meaning of the **argv and **++argv in the code below?

5 New Member
Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3. /* myprog.c */
  4. #include<stdio.h>
  5.  
  6. int main(int argc, char **argv)
  7. {
  8.     printf("%c\n", **++argv);
  9.     return 0;
  10. }
  11.  
  12.  
this question i found on http://www.indiabix.com/c-programming/command-line-arguments/068001
with ans o but without explaination.
help me out
Mar 28 '11 #1
2 2013
weaknessforcats
9,208 Recognized Expert Moderator Expert
So, if argv is an array of atrings, then *argv is a string in the array, then **argv is a character in that string.
Mar 28 '11 #2
donbock
2,426 Recognized Expert Top Contributor
You can't understand the result without knowing how the program was invoked. From the link you provided, it was:
Expand|Select|Wrap|Line Numbers
  1. cmd> myprog one two three 
The behavior of main arguments argc and argv are defined by the C Standard. Are you familiar with them?
Can you predict what their values are upon entry to main?
Mar 28 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2135
by: samlicon | last post by:
i have a java project to do , but what problem i encounter is how to fill / put an image of jpeg into a Reatangle in the code below please type the code in detail since i am an entry level...
14
3104
by: joshc | last post by:
I'm writing some C to be used in an embedded environment and the code needs to be optimized. I have a question about optimizing compilers in general. I'm using GCC for the workstation and Diab...
31
2590
by: DeltaOne | last post by:
#include<stdio.h> typedef struct test{ int i; int j; }test; main(){ test var; var.i=10; var.j=20;
8
1432
by: Polaris | last post by:
Hi Experts: The program creates Panels and inicilize them. When I run the code below, the program crashes (at the line commented below). Any help is appriciated. Thanks in Advance! Polaris ...
3
260
by: sam | last post by:
Hi, Whats the meaning of this code:- ((CCommunityDlg*)m_pWnd)->OnClose(); I know this is of VC++, But I just want to know what the logic behiind this cide, Please givve me solution Thanks in...
6
1948
by: vbdog | last post by:
Hi I am trying to convert the vb6 code below into vb.net code can anyboddy help The vb6 code is from a chip8 Emulator that somboddy wrote. vb6 code this function keeps getting called until the...
8
2101
by: jd2007 | last post by:
Why the Ajax code below in ajax.js is causing my form not to work ? ajax.js: var a=0; var b=0; var c=0; var d=0; var e=0; var f=0;
9
1925
by: metdos | last post by:
What is the meaning of this code line? x += b <? mid; Especially <? Thanks
7
2241
by: AAaron123 | last post by:
I read the help on which says: The ClientScriptManager class is used to manage client-side scripts and add them to Web applications... But could use a little help. Can someone tell me what...
3
1712
by: khatereh | last post by:
what is the meaning of this code volatile BOOL GotSUD; BOOL Rwuen; BOOL Selfpwr;
0
7405
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7066
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5643
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5059
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3198
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1568
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.