I have heard people saying the return type of main is strictly int
int main(){
printf("hello world");
return 0; // returning 0 to main indicates successful execution
}
Instead I tried simply return.
int main(){
printf("hello world");
return; //
}
It does not raise any warning or error. I wonder does it return 0 or some undefined value like in JavaScript?
I was reading this question return false the same as return? that says return and return false both are different in JavaScript. Is it the same in C?