I was just reading
ISO/IEC 9899:201x Committee Draft — April 12, 2011
in which i found under 188.8.131.52.3 Program termination
..reaching the } that terminates the main function returns a value of 0.
it means if you don't specify any return statement in
main() , and if the program runs successfully, then at the closing brace } of main will return 0.
But in the following code i don't specify any return statement, yet it does not return 0
int sum(int a,int b)
return (a + b);
printf("sum is %d",ans);
sum is 15
9 // here it should be 0 but it shows 9 why?