0

What do we mean by returning a value when we use int main function?

19th Dec 2016, 6:31 PM
Rubbiya Kamal
5 Answers
+ 3
The compiler you're using to run the code will usually add the command for you, so it's not necessary to write return 0. However it's convention to return 0 at the end of your main function, so you probably should anyways.
19th Dec 2016, 6:49 PM
B L
B L - avatar
+ 1
it means that if your program return zero from int main..your program worked perfectly
19th Dec 2016, 6:44 PM
Fluffy Rabbit
Fluffy Rabbit - avatar
0
so is it necessary to write return 0; or the function can do it itself too?
19th Dec 2016, 6:46 PM
Rubbiya Kamal
0
and what if I'm using void main, how can I check for errors? and when do we use void main?
19th Dec 2016, 6:53 PM
Rubbiya Kamal
0
i am on the way i loved this course well prepared one
20th Dec 2016, 6:15 AM
Fahad Abdulaahi Awad
Fahad  Abdulaahi Awad - avatar