Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assume that you correct for minor compile-time errors. The following code considers the impact of the size of some data types on programming. Given what

Assume that you correct for minor compile-time errors. The following code considers the impact of the size of some data types on programming. Given what you have learned, which statements are true for a modern computer?

  1. #include < iostream>
  2. using namespace std;
  3. int main() {
  4. int k, j = 2147483647;
  5. int i;
  6. float x = 1.0e27;
  7. double b
  8. j++;
  9. x *= 10;
  10. cout << "j = " << j << endl;
  11. cout << "k = " << k << endl;
  12. cout << "i = " << i << end1;
  13. cout << "x = " << x << endl;
  14. cout << "b = " << b < endl;
  15. return 0;
  16. }

Select one or more:

a. if j overflows on line 10 then line 12 will show that j is negative due to underflow.

b. j is uninitialized.

c. If the largest value of type float is on the order of 1.0e27 then line 15 will show that x is inf due to overflow on line 11.

d. If the largest value of type float is on the order of 1.0e27 then line 15 will show that x is negative due to overflow on line 11.

e. b is uninitialized.

f. k must hold the same value as j.

g. i is uninitialized.

h. if j overflows on line 10 then line 12 will show that j is negative due to overflow.

i. If the largest value of type double is on the order of 1.0e27 then line 16 will show that b is inf due to overlow on line 11.

Thank you !!!!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

More Books

Students also viewed these Databases questions

Question

LO10.3 Explain how demand is seen by a purely competitive seller.

Answered: 1 week ago