How do I access command-line arguments?

Answer Posted / srujana

we can access the command-line arguments by passing the
arguments argv and argc on to the main() function where
argv represents an array of pointers to strings and argc
holds the int value which is equal to the number of strings
that are in argv

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Should I learn data structures in c or python?

590


What are the different types of errors?

648


What is const volatile variable in c?

585


What is the size of a union variable?

606


how we can make 3d venturing graphics on outer interface

4020






Can you write the function prototype, definition and mention the other requirements.

670


In C, What is the #line used for?

1076


How we can insert comments in a c program?

636


What is #include stdio h and #include conio h?

605


What is the difference between printf and scanf )?

603


What are formal parameters?

666


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

2028


What is the maximum length of an identifier?

671


If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above

626


Explain pointers in c programming?

640