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 inprocess and outprocess in vb

1 Answers   Msoft,


what is the pl/sql block size in oracle 10g and 11g?

0 Answers  


5. How do you round the addition or subtraction of two numbers in assembler?

0 Answers   Wipro,


What are the main principles of OOP?

1 Answers  


I would like to know which institute in hyderabad provides best ms-dot net training along with a project. I want to join immediately. please help

2 Answers  


how to fin top two miximum values in sql? not 2nd both max value of 1st and 2nd both have to find out

0 Answers  


HOW TO DOWNLOAD ORCUT SITE VIDEOS IN PC WITH THE HELP OF MOZILL'S FIREFOX?

0 Answers  


what is runtime exception and compiletime exception ?

1 Answers   Accenture,


What is %Type,%Rowtype?

0 Answers  


what is the basic and unique feature of dotnet

0 Answers   HCL,


what is the difference between an OS(operating system) and Framework?

0 Answers  


what is web configuration file

0 Answers   HCL,


Categories