How do I access command-line arguments?
Answer Posted / reejusri
In order to access the command arguments, the main()
function must have a prototype similar to the following.
int main(int argc, char * argv[])
The names argc and argv are usually used for the
parameters, but a programmer could use different names.
Is This Answer Correct ? | 6 Yes | 4 No |
Post New Answer View All Answers
How can a number be converted to a string?
What is use of pointer?
What is a char in c?
Why is #define used?
What is the difference between fread and fwrite function?
Is c is a middle level language?
Can i use “int” data type to store the value 32768? Why?
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What is #include stdio h and #include conio h?
What is getch c?
How to compare array with pointer in c?
Explain how can a program be made to print the name of a source file where an error occurs?
Can you write the function prototype, definition and mention the other requirements.
What does 2n 4c mean?
"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above