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

What are Macros? What are its advantages and disadvantages?

643


please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com

1322


Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)

5791


Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

651


What is difference between arrays and pointers?

577






a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list

627


can anyone please tell about the nested interrupts?

1674


What is operator promotion?

625


What is the difference between null pointer and wild pointer?

630


How are strings stored in c?

590


Explain b+ tree?

618


Is there anything like an ifdef for typedefs?

696


What are the difference between a free-standing and a hosted environment?

740


Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?

2051


Explain what is a 'locale'?

581