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...

In the following declaration of main, "int main(int argc,
char *argv[])", to what does argv[0] usually correspond?




1) The first argument passed into the program


2) The program name


3) You can't define main like that

Answer Posted / vadivel

If the value of argc is greater than 0, the array members
argv[0] through argv[argc-1] inclusive shall contain
pointers to strings, which will be the command line
arguments. argv[0] will contain the program name, argv[1]
the first command line arg, argv[1] the second and so on.
Finally, argv[argc] is guaranteed to the a NULL pointer,
which can be useful when looping through the array.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use polymorphism in oops?

1103


What does enum stand for?

1181


What are main features of oop?

1178


What is abstraction example?

1154


What are the components of marker interface?

1103


What is polymorphism give a real life example?

1077


What is difference between abstraction and encapsulation?

1131


What is the point of oop?

1260


What are the 4 pillars of oop?

1201


What is a superclass in oop?

1217


What is oops concept with example?

1080


What is difference between polymorphism and inheritance?

1132


What is oops with example?

1098


assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).

2173


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

2198