Question: 1. a) What happens when you multiply two integers whose product is larger than the largest int value? Try out an example and report your
1.
a) What happens when you multiply two integers whose product is larger than the largest int value? Try out an example and report your findings. Give an example of multiplying two floating-point numbers that demonstrates limited precision.
b) Let n be an integer and x a floating-point number. Explain the difference between
n = x;
and
n = static_cast(x + 0.5);
For what values of x do they give the same result? For what values of x do they give different results? What happens if x is negative?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
