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

What is the difference b/w main() in C language and main()
in C++.

Answer Posted / kishan gowda

Ther is a difference b/w c and c++ main()...After execution
of int main() in c it returns zero on null to the operating
system where as in c++ it returns 1 to the O.S.

Ex:
In c:
int main(){ void main(){
..... .......
..... OR ......
return 0; }
}
In C++:

int main(){ int main(){
..... .......
..... OR ......
return 1; }//by default it retruns 1.
}

Is This Answer Correct ?    5 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of gets and puts?

1035


What is the difference between declaring a variable and defining a variable?

1282


Explain enumerated types in c language?

1053


What is a double c?

989


Write program to remove duplicate in an array?

1088


"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above

1025


What are the advantages of c language?

1099


Tell me when is a void pointer used?

1186


How many levels of pointers have?

1056


What are the different categories of functions in c?

1138


how to execute a program using if else condition and the output should enter number and the number is odd only...

2307


a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above

1396


What is the c language function prototype?

1088


Can we initialize extern variable in c?

1140


How is a macro different from a function?

1193