why main() method should not return any value

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

hoe to data grid use in sql server 2000?

1601


What is SAP TAO? · Which Version you are using? · What is the Latest Version in SAP TAO? · What are the Advantages in SAP TAO? · What are the Patches required for SAP TAO? · What is BPT? · Difference between BPT & SAP TAO? · Which Framework using for SAP TAO? · What is CBASE? · What is the SAP TAO Architecture? · What are the Prerequisites for SAP TAO? · SAP Solution Manager Mandatory for SAP TAO 1.0? · SAP Solution Manager Mandatory for SAP TAO 2.X? · What is UI Scanner? · What is Inspector? · How many ways to Create a components using TAO 1.0? · How many ways to Create a components using TAO 2.x? · Which service pack required for SAP TAO 2.7? · What is Import/Export? · What is Consolidate?

2389


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

2171


Mainly Related to Oracle, DBMS , Oracle Stored Procedures, Functions, Oracle 9i Architecture, Redo logs..., Views,

1861


How can recruiter justified that the candidate is expert in Algorithm and datastructure for Software product development ?

1503






What are events in smartforms?

1780


How to connect the .accdb database file of microsoft access to the Visual Basic 6.0 forms?

3700


iam confused among testing ,.net and java. can anybody help me.

1577


Which design patterns have you used?

1552


How to know we are in home page of a web application using QTP

2002


Code for display the images from drive using vb 6.0?

4291


What is the use of Differ interface check box in Ship confirm?

1847


how do i create my own exception class which will restrict IO exception?

2301


which book we learned this mantis? how many version are realsed this mantis upto now?

1421


What is autocall macro and how to create autocall macro? what is the use of it?

1495