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


why main() method should not return any value

Answers were Sorted based on User's Feedback



why main() method should not return any value..

Answer / nadeem khokhar

execution starts from the main function. no function can call it, which means no function can save the returned value from main. then why should we take its return type as we can not use that any where! i do agree to jhill123 that in C we write int main instead of void main, it is used for exception handling.

Is This Answer Correct ?    4 Yes 2 No

why main() method should not return any value..

Answer / jhil123

It is possible if we declare main() function return value
as void. This is because the default return value of main
function in C is int and if one declares it as void it
results in mismatch in declaration and so cannot be
declared as void.

Is This Answer Correct ?    6 Yes 7 No

Post New Answer

More Programming Languages AllOther Interview Questions

Why COBOL/400 is giving 95 session error when opening a file even though the file is having key and the screen or display file is having IND ARA defined?

1 Answers   Freelance,


what is difference between c and C#

12 Answers   MCN Solutions,


Why data bus is bidirectional and address bus is unidirectional?

4 Answers   Infosys, Wipro,


can we convert .class file to dll file

1 Answers  


What is WEB 3.0? What are the features their in WEB3.0

0 Answers  


How to swap values between two variables without using a third variable?

24 Answers   HCL, TCS,


Suppose server object is not loaded into the memory, and the client request for it , what will happen?

0 Answers  


the systematic access of small computers in a distributed data processing system is referred as?

0 Answers   Mphasis,


WHat is execution in manual testing and when will we start execution and what language we use in execution

0 Answers  


What is the worst case of AVL tree?

1 Answers  


Diff between Proc transpose and Arrays with example?

2 Answers   Accenture,


what is delegats ?

4 Answers  


Categories