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 context in c?

883


Is it better to bitshift a value than to multiply by 2?

1049


How do I determine whether a character is numeric, alphabetic, and so on?

1070


What are lookup tables in c?

950


while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above

1197


How would you use the functions fseek(), freed(), fwrite() and ftell()?

1104


how can use subset in c program and give more example

1927


How can I implement a delay, or time a users response, with sub-second resolution?

1033


Which header file should you include if you are to develop a function which can accept variable number of arguments?

1320


What are structures and unions? State differencves between them.

1099


Explain why can’t constant values be used to define an array’s initial size?

1304


What is calloc()?

1026


Is c programming hard?

970


Are local variables initialized to zero by default in c?

983


Can we declare variable anywhere in c?

920