+ 4

Pls I don't understand something guys,, what is the meaning of the return 0; function in c++?

return 0; c++

16th May 2018, 7:18 AM
Eniola Odunmbaku
Eniola Odunmbaku - avatar
4 ответов
+ 8
hey, nice to have you here. this question is asked many times . Please, make a bit search using Sololearn search feature. if you will create some threads that already exist, this might get label of Duplicate or can be deleted here is this. https://www.sololearn.com/Discuss/1226950/?ref=app
16th May 2018, 7:27 AM
Raj Chhatrala
Raj Chhatrala - avatar
+ 4
Thanks very much!
16th May 2018, 11:04 AM
Eniola Odunmbaku
Eniola Odunmbaku - avatar
+ 1
In C and C++ programs the main function is of type int and therefore it should return an integer value. The return value of the main function is considered the "Exit Status" of the application. On most operating systems returning 0 is a success status like saying "The program worked fine".
16th May 2018, 7:26 AM
Andrea Simone Costa
Andrea Simone Costa - avatar
+ 1
hi, return statement is used in a function to show that the function has terminated correctly or not
16th May 2018, 7:27 AM
Rajeeb