+ 9
What is the difference between int main () and void main()?
6 Answers
+ 8
thanks
+ 3
If you will enter int main() then to end the program you also have to return 0() but there is no need to write return 0() if you start with void main()
+ 2
don't use too much void main(). int main() always better
+ 1
Every function must have a return type, as per the rule.
Return type means the type of value that will be returned by the function.
If we don't require any value to be returned by the function, we must use 'void' as the return type of function.
void means "nothing or no-value".
Using int as return type for our function requires a return statement at the end of the program which should return an integer value.
In most compilers, for int return type, the default value 0 is automatically returned.
+ 1
int main() returns integer value where void main() returns non value...means if u use void(returnless)...then u ll nothing have to return.
+ 1
đđkeep coading brother