This is a simple code to check the behavior of GCC handling conversion specifications.(i know the warnings and so on, but i just play with the conversions)
#include <stdio.h>int main(){ int i = 15; float x = 5.53f; printf("i = %d, x = %f\n", i, x); printf("i = %f, x = %d\n", i, x); return 0;}
the output is what make it quite confusing for me because it swaps the two values in printing, the output is :
i = 15, x = 5.530000i = 5.530000, x = 15
Can anyone explain this behavior ?