Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How do I access command-line arguments?

Answers were Sorted based on User's Feedback



How do I access command-line arguments?..

Answer / 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

How do I access command-line arguments?..

Answer / 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

More C Interview Questions

What is hungarian notation? Is it worthwhile?

0 Answers  


what is the difference between c and c++?

7 Answers  


write a program without using main function?

2 Answers   TCS,


Write a c program to find, no of occurance of a given word in a file. The word is case sensitive.

2 Answers  


How do you print only part of a string?

0 Answers  


Explain how do you override a defined macro?

0 Answers  


What are the preprocessors?

9 Answers   HP,


What is the difference between fread buffer() and fwrite buffer()?

0 Answers  


True or false: If you continuously increment a variable, it will become negative? 1) True 2) False 3) It depends on the variable type

7 Answers  


define function

4 Answers   Assurgent, Sonata,


What is the general form of a C program?

0 Answers  


How to write a code for random pick from 1-1000 numbers? The output should contain the 10 numbers from the range 1-1000 which should pick randomly, ie ,for each time we run the code we should get different outputs.

12 Answers   NetApp,


Categories