Can you please tell me why in below code answer is 1610612736? How to calculate this answer?
#include <stdio.h>
int main()
{
float h=4.1;
printf("\n%d\n",h);
return 0;
}
Can you please tell me why in below code answer is 1610612736? How to calculate this answer?
#include <stdio.h>
int main()
{
float h=4.1;
printf("\n%d\n",h);
return 0;
}
Do this instead:
printf("\n %f", h);
You need to use the right specifier... you were using %d
which is for integers.