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

4.Write a program to get the string in array and print that? or Without using loop print the array.

3 Answers  


An image map is a collection of

1 Answers   Velocis,


Wrtite a JCL for sorting a file with start from 36 postion lenth 9 excluding a num eq to 98768. for 3 marks mainframe

0 Answers  


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

0 Answers   Mphasis,


how we can call xml file in java file using Android platform?

2 Answers   TCS,


What is the client concept in SAP? What is the meaning of client independent?

3 Answers  


5.Call by value and Call by reference with program?

0 Answers  


i want to improve my english vocab for racking campus written exam plz tell me best book for prepration......

0 Answers  


What are data structures?

1 Answers  


write algo for cobol program whichuse three flat file to extract some specific information 8 marks mainframe

0 Answers  


sample and simple coding where we get?

0 Answers   IBM,


How same session variable can be used in both Asp and Asp.net?

1 Answers   Wipro,


Categories