Question: When you run this program, it prints 4 3 4 as the value of cents: double price = 4 . 3 5 ; int cents
When you run this program, it prints as the value of cents: double price ; int cents price; Should be cout cents endl; Prints What is the probable reason? Question options: A roundoff error occurs with binary floating point variable values. When double values are assigned to ints, any fractional part is dropped. Both of options are correct. Neither option is correct.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
