why main() method should not return any value
Answers were Sorted based on User's Feedback
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 |
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 |
Info for guidewire documents and interview questions
How can we develop a multi-tier application in Java?
code for connection from windows forms to sql server
Difference between abstract class and Interfaces in Java
9 Answers Nest, Persistent, Yantro Software,
what is the similarity between networking devices?
how sap is different from other software ?
What is the use of Differ interface check box in Ship confirm?
Even if all fields are initialized also in a program, I am getting COBOL/400 decimal data error .why is it coming?
what is the diff bw sql direct and jdbc update can't we do select and updating operation in sql direct
How to display questions one by one in jsp and I wants to store the answers in my database?
What is the client concept in SAP? What is the meaning of client independent?
What is a dialog based program