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

Explain main function in c?

1135


What is enumerated data type in c?

1127


What will be your course of action for a push operation?

1154


What does the file stdio.h contain?

1119


How many levels of indirection in pointers can you have in a single declaration?

1143


What is the -> in c?

1064


What is the difference between %d and %i?

1147


What is the size of empty structure in c?

1127


What is self-referential structure in c programming?

1281


What is the difference between fread and fwrite function?

1131


What is pointers in c with example?

1138


What is the difference between variable declaration and variable definition in c?

1104


Explain what is the difference between null and nul?

1214


What kind of structure is a house?

1099


What is the use of gets and puts?

1093