+ 1

Can anyone tell me why our main()'s data type is integer? and why we return "0" ?

I'm new for programming.. Thank you :)

3rd Oct 2016, 4:40 AM
Nasser
Nasser - avatar
1 Answer
0
That would be because the main function returns an integer upon completion, and 0 indicates a successful run. Most of the time, a value other than 0 means the function terminated early. Enjoy :)
6th Oct 2016, 3:00 PM
Chese780 ~
Chese780 ~ - avatar