- 1

How int main () and void main() works

19th Jan 2020, 9:58 AM
RAJGOPAL NAYAK K
RAJGOPAL NAYAK K - avatar
2 Respostas
+ 2
The difference is on what they are able to return, void main() shouldn't return anything, but int main() should return an integer.
19th Jan 2020, 11:09 AM
Seb TheS
Seb TheS - avatar
+ 1
They are the entry point function of a c or c++ program. They accept two parameters : number of arguments and a array of string representing the command-line arguments.
19th Jan 2020, 10:23 AM
Théophile
Théophile - avatar