0

%d is use for decimal value

int a=1.30; Printf("%d",a); Output show 1 Why it is ???

8th Jan 2019, 3:41 AM
Jyotiprakash Mohanta
Jyotiprakash Mohanta - avatar
3 odpowiedzi
0
Because it is type casting floating data type to integer data type Hence ignore the numbers after point
8th Jan 2019, 3:55 AM
PRAMOD JANA
PRAMOD JANA - avatar
0
Why we use %f for decimal value
8th Jan 2019, 4:05 AM
Jyotiprakash Mohanta
Jyotiprakash Mohanta - avatar
0
We can use it but it will convert your integer value to floating value
8th Jan 2019, 6:37 AM
PRAMOD JANA
PRAMOD JANA - avatar