0

Does the main fuction also returns values?

I haven't seen main function returning any values, is there any use of int along with main()?

17th Jun 2016, 7:32 AM
Siddharth Pandey
Siddharth Pandey - avatar
1 Answer
+ 1
not necessary to use int with main use void main() no need to return any value no return statement needed at the and when we written int with main that means the no. of error the program return and we don't want any error so we return 0
17th Jun 2016, 7:47 AM
DJ Shiva & DJ Baba Shiv-Shekhar
DJ Shiva & DJ Baba Shiv-Shekhar - avatar