My code is:
#include<stdio.h>
#include<math.h>
int main()
{
int c = pow(3,2);
printf("%f %f %d \n\n",pow(3,2),c,c);
printf("%f %d %f \n\n",pow(3,2),c,c);
return 0;
}
The output is:
9.000000 0.000000 4200688
9.000000 9 0.000000
Can anyone explain why in the first line of output instead of printing 9 (like it does in the 2nd line of output) it prints 4200688 (garbage value probably)?