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

What is default value of global variable in c?

558


simple program of graphics and their output display

1464


Explain argument and its types.

594


Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

623


What is a sequential access file?

644






Why we write conio h in c?

557


What is NULL pointer?

671


What is #pragma statements?

583


Linked lists -- can you tell me how to check whether a linked list is circular?

639


what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values

1255


Explain what is #line used for?

603


Is there sort function in c?

572


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

658


What is the purpose of & in scanf?

589


Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014  Npu university

1594