hello all.
just observe this piece of code
on compilation and execution usgin gcc, i get the answer asCode:fun() { printf("Hello world"); } int main() { int c = 5; printf("c = %d\n",c); c=fun(); printf("c = %d\n",c); return 0; }
c = 5
c = 11 (-----> the no of chracters printed by printf())
but since there is no return statement in fun(), the second value of c should contain a junk value.
according to k & r if a function doesnt have a return statement, its return valu is junk value.
but why does c contain the no of characters printed by printf ???