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 |
Why COBOL/400 is giving 95 session error when opening a file even though the file is having key and the screen or display file is having IND ARA defined?
what is difference between c and C#
Why data bus is bidirectional and address bus is unidirectional?
can we convert .class file to dll file
What is WEB 3.0? What are the features their in WEB3.0
How to swap values between two variables without using a third variable?
24 Answers HCL, TCS,
Suppose server object is not loaded into the memory, and the client request for it , what will happen?
the systematic access of small computers in a distributed data processing system is referred as?
WHat is execution in manual testing and when will we start execution and what language we use in execution
What is the worst case of AVL tree?
Diff between Proc transpose and Arrays with example?
what is delegats ?