- 1
Can we write return 1 or 2 or any number instead of return 0;
I tried this and there is no difference 😅
3 ответов
+ 3
If you using int main then its necessary to use return statement but its not necessarily to write return 0 . You main can written any Integer values if it is 1 2 or anything .
You can also use
return EXIT_SUCCESS; for successful compilation same for EXIT_FAILURE its a long story how it came in windows for now u cam use this also