+ 1
Who will call the return 0 statement ?
#include<stdio.h> int main(){ int a=10,b=10,c; c=a+b; printf("the value is",c); return 0; }
3 ответов
+ 10
Whoever calls main(), will receive the return value. Since your programs are initiated by your operating system, the return statement returns value 0 back to your OS to signal that the program has run successfully. If your program crashes, the return value will not be 0.
P.S. It's <stdio.h> * or <cstdio> btw.
+ 3
the return 0 is called when everything else is done in the program, so returning zero will say "false" for the main function, meaning to finish the program.
Also, the printf should have %d, or %i betweeen the strings, to show the data from var c.
0
because that question asked by one person in my technical interview ... who will call the return..