answersLogoWhite

0


Best Answer

The full form of this is:

char* argv[];

Where argv is a pointer to a null-terminated array of null-terminated strings.

We use this type of argument to pass command line switches to the main function:

int main (char * argv[], int argc);

The names of these arguments, argv and argc, are conventional. The argc argument tells us how many elements are in the argv argument, such that argv[0] is the full-qualified name of the executable and argv[argc] is the null-terminator of the array. Any and all other elements (argv[n], such that 0<n<argc) represent programmer-defined command-line switches.

User Avatar

Wiki User

6y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What does char argv mean?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Give examples for pointers within pointers?

If you mean pointers referring pointers then here you are: int main (int argc, char **argv) { printf ("argv (pointer) is %p\n", argv); printf ("*argv (pointer) is %p "%s"\n", *argv, *argv); printf ("**argv (char) is %c\n", **argv); return 0; }


What is earlier declaration for main?

pick one: int main (void); int main (int argc, char **argv); int main (int argc, char **argv, char **envp);


What is an example of a parameter?

'argc' and 'argv' in this line: int main (int argc, char **argv)


What is an example of array?

argv, which is the second parameter of function mainint main (int argc, char *argv[])


What does charred mean?

The full form of this is: char* argv[]; Where argv is a pointer to a null-terminated array of null-terminated strings. We use this type of argument to pass command line switches to the main function: int main (char * argv[], int argc); The names of these arguments, argv and argc, are conventional. The argc argument tells us how many elements are in the argv argument, such that argv[0] is the full-qualified name of the executable and argv[argc] is the null-terminator of the array. Any and all other elements (argv[n], such that 0&lt;n&lt;argc) represent programmer-defined command-line switches.


Types of main function in C programming?

minimalist: int main (void); standard: int main (int argc, char **argv); unix-only: int main (int argc, char **argv, char **envp);


Give you a complete example program that uses pointers?

int main (int argc, char **argv) { printf ("argv pointer is %p, argv[0] pointer is %p\n", argv, argv[0]); return 0; }


What is a valid heading for the main program?

For a 'C' program, the main routine must be on of these:int main (void)int main (int argc, char ** argv)int main (int argc, char ** argv, char **envp) /* on some platforms */


Why doesn't the main function need a prototype statement?

Because we usually don't call it from the program, but if we do, you should have a prototype: int main (int argc, char **argv); int foobar (const char *progname) { char *param[2]; ... param[0]= progname; param[1]= "help"; main (2, param); ... } int main (int argc, char **argv) { ... foobar (argv[0]); ... }


Wap of function call by value?

This 'question' is not a question, but here you are. int main (int argc, char **argv) { printf ("argc=%d argv=%p\n", argc, argv); return 0; }


Program using putstr function in pointer in c?

#include &lt;stdio.h&gt; int main (int argc, char **argv) { puts (argv[0]); return 0; }


What is an array pointers?

I guess it is an 'array of pointers'. Example:int main (int argc, char *argv[])