What is the difference between return 0 in the end of main code and return 0 in the end of function code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the difference between return 0 in the end of main code and return 0 in the end of function code

in return 0 ,0 which means the code is successfully compiled but in functions return 0 means it returns value zero why this is happening

16th Aug 2018, 2:16 PM
Kondepati Bhavana
1 Answer
0
main is itself a function which return result to OS and usually 0 code mean "no error/problem in execution" when returned to OS (in main)
16th Aug 2018, 2:42 PM
KrOW
KrOW - avatar