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


Please Help Members By Posting Answers For Below Questions

Explain union.

905


What is extern variable in c with example?

760


The statement, int(*x[]) () what does in indicate?

896


please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code

1923


Why do we need volatile in c?

939


What is self-referential structure in c programming?

888


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

2150


Explain enumerated types in c language?

790


What is wild pointer in c?

799


What are the keywords in c?

863


Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.

854


What is the scope of local variable in c?

791


Which one would you prefer - a macro or a function?

840


What is variables in c?

806


If null and 0 are equivalent as null pointer constants, which should I use?

817