What is actually the role of return 0; ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is actually the role of return 0; ?

26th Sep 2016, 4:16 PM
Aswin K R
Aswin K R - avatar
1 Answer
+ 2
Your main function is int type. This means it has to return an integer because otherwise it would be void. 0 is the integer that it returns
28th Sep 2016, 2:59 PM
Andrei Cîrpici
Andrei Cîrpici - avatar