+ 2
Why we use int out of main function??
int main() { statements } here why we use int before main function....
4 Respuestas
+ 9
int means that the function returns an integer:
int add(int a, int b) {
return a + b; // <<== return value of the function is an integer
}
+ 2
It offers a way to tell, how the program terminated, often 0 means that the program ran well and terminated with no errors.
But 1 means that the program was terminated with errors.
This is used in programs, such as the command prompt, it is very useful, when you want to run the command prompt from a program, when it returns 1 or 0, telling, whether executing a command caused problems or not.
0
Thank you..