For the following code fragment, what’s the output?

I have a homework problem for C Programming that I can't figure out. Please help! Thanks in advanced!

float f1 = 0.2, f2 = 0.5;

printf("(f1*f1 == 0.1) = %d", f1*f1 == 0.1);

printf("(f1+f1 == 0.07) = %d", f1+f1 == 0.07);

Update:

Thanks jacob. wouldn't f1+f1=0.01 though? Making the output 0?

Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Helpful Social

Copyright © 2024 1QUIZZ.COM - All rights reserved.