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
Answers were Sorted based on User's Feedback
Answer / sanish joseph
No guys the ans s 2
it prints d program name:
arguments counts only from 1 nd nt 4m 0
| Is This Answer Correct ? | 15 Yes | 0 No |
Answer / 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 |
Answer / sumeet sharma
argv[o] the array of strings will point to the name of the
program.
argv[1] will point to the first argument and so on.
| Is This Answer Correct ? | 1 Yes | 0 No |
What is polymorphism explain?
Should you protect the global data in threads? Why or why not?
What are the four main oops concepts?
What is the correct syntax for inheritance? 1) class aclass : public superclass 2) class aclass inherit superclass 3) class aclass <-superclass
Difference between vector and array
any one please tell me the purpose of operator overloading
What are constructors in oop?
when to use 'mutable' keyword and when to use 'const cast' in c++
Can java compiler skips any statement during compilation time?
i^=j; j^=i; i^=j; value of i,j
143.what is oops principles?
Round up a Decimal number in c++.. example Note = 3.5 is as 4 3.3 is as 3
3 Answers Accenture, Cognizant, IBM,