Introduction
The main
function is an int
function, meaning it returns an integer. The return value indicates how the program exited. If the program runs successfully main
should return 0
. Non-zero return values, usually 1
, indicate that the program exited with a problem.
If omitted, the main
function returns 0 by default.
Make the main
function returns 0
.
return 1;
to return 0
or remove it.