4 AnswersNew Answer
Just popping in here to quickly mention that void main is illegal C or C++ according to the standard. Even though some compilers allow it, a proper compiler will reject it. So in other words, don't use it.
Mariah Yvonne consider main as function like other function... (actually main is specific function which gets executed first) so, int of void is just data type which is returned from function call... if you say int main(); at the end of function, you should return value be it zero or any other value... with void main(), it's not required to return value... in c++, you can have either int main or void main, but for c, int main is only possible way... for c++ also, it's recommend to use int main and return value
thank you so much this was so helpful
The concepts remain same. int main() simply means that the code returns an int 0 if the code runs without errors void main() means that the code returns nothing at all.