-3

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;
    }
show team
  • 1
  • 1

1 Answers1

3

Do this instead:

printf("\n %f", h);

You need to use the right specifier... you were using %d which is for integers.

Kevin
  • 6,483
  • 1
  • 14
  • 23
Bilal Saleem
  • 593
  • 2
  • 8