JazzyQuokka
JazzyQuokka
Student

Just a confusion

I am a beginner at coding, Look at the following code If I use a float that is %f then answer is 0 which in case of integer ,i.e, %d should be 36

WHY SO?

Post image
20mo ago
Jobs
One interview, 1000+ job opportunities
Take a 10-min AI interview to qualify for numerous real jobs auto-matched to your profile 🔑
+322 new users this month
WobblyMuffin
WobblyMuffin

%f requires double value

JazzyQuokka
JazzyQuokka
Student20mo

But since int requires less bytes then float can't that go and get stored in float ?

GroovyPretzel
GroovyPretzel

Who said int required less bytes than a float?

Discover more
Curated from across