S
Sanjay Kulkarni
I am facing some problems while trying to explore the printf
statement:
Expected Actual
Result Statement Result
1 printf("x = %d", 18.0 / 14); 18725
5.0 printf("\nx = %f", 5); 0.000000
5 printf("\nx = %d", 5.0); 0
What am I missing? Is there some issue with floats?
I have included conio.h, stdio.h, float.h and math.h.
- Sanjay Kulkarni
statement:
Expected Actual
Result Statement Result
1 printf("x = %d", 18.0 / 14); 18725
5.0 printf("\nx = %f", 5); 0.000000
5 printf("\nx = %d", 5.0); 0
What am I missing? Is there some issue with floats?
I have included conio.h, stdio.h, float.h and math.h.
- Sanjay Kulkarni