+ 3
Explain the diffrence between int main and void main please.
4 Respostas
+ 13
+ 12
int main returns a value
void main does not return value
+ 8
int main return an int value.
void main not return anything.
In almost compiler now, main must return int. When you declared main as void, it is error! Some old compiler like Turbo C++, main return as void!
+ 5
int main() usually has to return 0 at the end (can be omitted in modern compilers), while void main() doesn't have to return anything. int main() is the standard however.