C++ question | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

C++ question

What is return 0; mean in C++.

28th Oct 2019, 12:07 PM
Abu Hurrara
Abu Hurrara - avatar
1 Answer
+ 6
return 0 in C/C++ means returns the value 0 from current function to caller function. In the main() the value will be returned to system. It is not necessary that every time we should use return 0 to return program's execution status from the main() function. But returned value indicates program's success or failure to the operating system and there is only one value that is 0 which can indicate success and other non zero values can indicate failure of execution due to many reasons like memory leak, etc
28th Oct 2019, 1:10 PM
Nova
Nova - avatar