0
What is the difference between return 0 in the end of main code and return 0 in the end of function code
in return 0 ,0 which means the code is successfully compiled but in functions return 0 means it returns value zero why this is happening
1 Answer
+ 1
It has integer return type therefore it has to return something at the end , hence we use 'return 0' statement at the end of the function. If you usemain() function as an int i.e. Integer type then return(0) is used in program to return a value which will be an integer