0

Is there some big reason behind using int and return 0; lines since we still get same results when not using them.

Just started learning today (no rude replies please)

29th Jul 2016, 12:15 PM
isijola ladipo
isijola ladipo - avatar
1 Réponse
0
yes. the int main is the return type of the program (just like any other function) when the program exits it will return an integer value, hopefully 0,to indicate it'd exit status. and since we declare our main function as int it must return a value. now if you declared it void main it doesn't return a value(since it void, void functions return nothing)
4th Aug 2016, 4:51 PM
destro