What will be output by the following statements?


double x = 1.23456789;
cout << fixed;
cout << setprecision(5) << x << endl;
cout.precision(3);
cout << x << endl;
cout << x << endl;

a. 1.2346
1.23
1.23
b. 1.23457
1.235
1.23456789
c. 1.2346
1.23
1.23456789
d. 1.23457
1.235
1.235


d. 1.23457
1.235
1.235

Computer Science & Information Technology

You might also like to view...

If you delete a file from the hard drive and immediately change your mind, you can undo it

Indicate whether the statement is true or false

Computer Science & Information Technology

Match the following terms to their meanings:

I. Any software that intentionally does harm to computers A. dual core II. Data handling capacity of a PC dealing with data group size B. malware III. Program that records your keystrokes or looks at your hard drive C. architecture IV. A benchmark that measures overall CPU performance D. spyware V. Processor type that has two separate CPU units E. P-rating

Computer Science & Information Technology

Programming languages use ________ which are similar to grammar rules

Fill in the blank(s) with correct word

Computer Science & Information Technology

To use a three-tier structure for a program, you must divide the processing into ____.

A. baselines B. indices C. classes D. references

Computer Science & Information Technology