- 3
if program coded without return 0 what difference happend in output screen?
4 ответов
+ 3
Both in c and c++ return 0 is optional. Also MAGESH T K use appropriate tag and include the language tag next time.
+ 1
Nothing
0
In c ,u need to use it since main function requires it or else error might come (maybe)
In c++ it's optional since compiler automatically adds return 0;
0
If we're talking C++ then most compilers will automatically handle no returns on your main function by automatically returning 0, so there's no real difference unless you manually return something different. Unless your compiler is really bad and errors when there's no return in the main function.