+ 8
Why do we have to return 1 in int main() function?
2 ответов
+ 14
return n is equivalent to exit n. return 0 means the program succeeded, return different from 0 means the program exited due to error or anomaly. If you exit with a status different from 0 you're supposed to print an error message to stderr.
+ 1
If your fucntion declaration is int or what ever variable , you must put return . If you dont want to put return , use void main() , this function returns noting