What will be the behavior and output of the following code if i accidentally code so in C/C++,
float a = 12.5;
printf("%d\n", a);
printf("%d\n", *(int *)&a);
What will be the behavior and output of the following code if i accidentally code so in C/C++,
float a = 12.5;
printf("%d\n", a);
printf("%d\n", *(int *)&a);
Rubish and more rubish.
You would get something meaningful if you did the following though
printf("%d\n", (int)a);