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

Do you know pointer in c?

585


Explain enumerated types in c language?

602


How can I remove the leading spaces from a string?

630


What is wrong with this program statement? void = 10;

816


What is array of structure in c programming?

747






Explain goto?

709


What math functions are available for integers? For floating point?

616


How do we print only part of a string in c?

579


Where can I get an ansi-compatible lint?

634


What language is c written?

574


What is indirection?

646


What is c system32 taskhostw exe?

582


What is the purpose of type declarations?

673


Do pointers take up memory?

652


What is a const pointer?

630