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

consider the following C code main() { int i=3,x; while(i>0) { x=func(i); i--; } int func(int n) { static sum=0; sum=sum+n; return(sum); } the final value of x is

4 Answers   TCS,


What is pointers in c?

0 Answers  


What is a union?

0 Answers  


Program to find the sum of digits of a given number until the sum becomes a single digit

8 Answers   InterGraph,


If the static variable is declared as global, will it be same as extern?

1 Answers   Samsung,


What is a lookup table in c?

0 Answers  


What is .obj file in c?

0 Answers  


An entire structure variable can be assigned to another structure variable if __________

3 Answers   Sasken, TCS, Tech Mahindra, Wipro,


I need previous papers of CSC.......plz help out by posting them.......

0 Answers  


What is the difference between void main() and int main()?

1 Answers  


What are identifiers and keywords in c?

0 Answers  


Name the language in which the compiler of "c" in written?

3 Answers   Bajaj,


Categories