In the following declaration of main, "int main(int argc,
char *argv[])", to what does argv[0] usually correspond?
1) The first argument passed into the program
2) The program name
3) You can't define main like that
Answer Posted / vadivel
If the value of argc is greater than 0, the array members
argv[0] through argv[argc-1] inclusive shall contain
pointers to strings, which will be the command line
arguments. argv[0] will contain the program name, argv[1]
the first command line arg, argv[1] the second and so on.
Finally, argv[argc] is guaranteed to the a NULL pointer,
which can be useful when looping through the array.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Write a program to sort the number with different sorts in one program ??
What does I oop mean?
What are the benefits of oop?
Write a program to reverse a string using recursive function?
Why do we use oops?
Can private class be inherited?
What are properties in oop?
What are constructors in oop?
write knight tour problem which is present in datastructure
What is interface in oop?
to find out the minimum of two integer number of two different classes using friend function
What is a class oop?
Why do we use polymorphism in oops?
I have One image (means a group photo ) how to split the faces only from the image?............ please send the answer nagadurgaraju@gmail.com thanks in advace...
What is the example of polymorphism?