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

what is difference between input parameter and output parameter.

0 Answers   NIIT,


what are the activities you enjoy most and How do you see these Developing in the Future with Reference to in your work life and in your personal life

0 Answers  


what is session state?

0 Answers   HCL,


Hello...has anyone interviewed with Information Management Services(IMS)located in Silver Spring MD??If yes,what can you share about the programming test and the analytical test?

0 Answers   Information Management Services,


How to display questions one by one in jsp and I wants to store the answers in my database?

0 Answers  


1.group by clause explain along with an example 

1 Answers   Parexel,


can we convert .class file to dll file

1 Answers  


Outline the two important features of a terminating recursion. Any ideas?

0 Answers  


if there are n nodes in a binary tree, how many null pointers are there?

4 Answers   Hughes,


10.Define filters,binary to hexadecimal,hexadecimal to decimal?

0 Answers  


Is strus threadsafe or not?

1 Answers  


When we use Windows authentication mode

0 Answers  


Categories