Consider the following code snippet
float a=12.2;
printf("%f %d",a,a); //output 12.200000 Garbage value
but
printf("%d %f",a,a);//Output Garbage value Garbage Value
my question is why in the second printf, both %d and %f gives garbage value. I know it is because I have used %d first?..But can't find any proper explanation..