+ 3

INT MAIN

what are the advantage of using int main???

15th Nov 2016, 2:21 PM
sanket jain
sanket jain - avatar
5 Answers
+ 6
just int main() will work everywhere, while void main() will not..
15th Nov 2016, 4:02 PM
Rebeka Asryan
Rebeka Asryan - avatar
+ 4
so basically the return value from the main() function is used by the runtime library as the exit code for the process......right?
15th Nov 2016, 4:33 PM
sanket jain
sanket jain - avatar
+ 2
void doesn't returns any type while int or anything else does.
15th Nov 2016, 4:32 PM
David
David - avatar
+ 1
The int part of int main() is good, because it will work universally, and gives you the ability to terminate your program prematurely.
15th Nov 2016, 2:55 PM
Keto Z
Keto Z - avatar
0
you u can use it ,when u need Ur main function to return some int values
15th Nov 2016, 2:30 PM
JEGANRAJ.D
JEGANRAJ.D - avatar