C++
...
Suppose that x = 25.67, y = 356.876, and z = 7623.9674. What is the output of the following statements? cout << fixed << showpoint; cout << setprecision(2); cout << x << ' ' << y << ' ' << z << endl
False
If a C++ arithmetic expression has no parentheses, operators are evaluated from left to right.
False?
In the statement cin >> x;, x can be a variable or an expression.
True
Information stored in main memory must be transferred to some other device for permanent storage.
True
Main memory is directly connected to the CPU.
True or False
Suppose a = 5. After the execution of the statement ++a; the value of a is 6.
alpha = 5 alpha = 10 alpha = 50 alpha = 50.0
Suppose that alpha and beta are int variables and alpha = 5 and beta = 10. After the statement alpha *= beta; executes, ____.
...
Suppose that ch1 and ch2 are char variables and the input is: WXYZ What is the value of ch2 after the following statements execute? cin >> ch1; ch2 = cin.peek(); cin >> ch2;
...
Suppose that ch1 and ch2 are char variables and the input is: WXYZ What is the value of ch2 after the following statements execute? cin.get(ch1); cin.putback(ch1); cin >> ch2;
...
Suppose that ch1 and ch2 are char variables, alpha is an int variable, and the input is: A 18 What are the values after the following statement executes? cin.get(ch1); cin.get(ch2); cin >> alpha;
'A' 'B' 'C' '\n'
Suppose that ch1, ch2, and ch3 are variables of the type char and the input is: A B C What is the value of ch3 after the following statements execute? cin.get(ch1); cin.get(ch2); cin.get(ch3);
...
Suppose that x = 1565.683, y = 85.78, and z = 123.982. What is the output of the following statements? cout << fixed << showpoint; cout << setprecision(3) << x << ' '; cout << setprecision(4) << y << ' ' << setprecision(2) << z << endl;
...
Suppose that x = 55.68, y = 476.859, and z = 23.8216. What is the output of the following statements? cout << fixed << showpoint; cout << setprecision(3); cout << x << ' ' << y << ' ' << setprecision(2) << z << endl;
...
Suppose that x and y are int variables, ch is a char variable, and the input is: 4 2 A 12 Choose the values of x, y, and ch after the following statement executes: cin >> x >> ch >> y;
...
Suppose that x and y are int variables, z is a double variable, and the input is: 28 32.6 12 Choose the values of x, y, and z after the following statement executes: cin >> x >> y >> z;
...
Suppose that x and y are int variables. Which of the following is a valid input statement?
...
Suppose that x is an int variable and y is a double variable and the input is: 10 20.7 Choose the values after the following statement executes: cin >> x >> y;.
bleh
What is the output of the following statements? cout << "123456789012345678901234567890" << endl cout << setfill('#') << setw(10) << "Mickey" << setfill(' ') << setw(10) << "Donald" << setfill('*') << setw(10) << "Goofy" << endl;
12345678901234567890 ***18**Happy**Sleepy
What is the output of the following statements? cout << setfill('*'); cout << "12345678901234567890" << endl; cout << setw(5) << "18" << setw(7) << "Happy" << setw(8) << "Sleepy" << endl;
True or False
When the computer is turned off, everything in secondary memory is lost.
char Char CHAR character
Which of the following is a reserved word in C++?
x = 15, ch = 'A', Y=73.2
X is int, Y is double, and CH is a char input is: 15A 73.2 Values after the following statement executes: cin >> x >> ch >> y;
endl fixed scientific setfill
____ is a parameterized stream manipulator.
a. "-129" b. 'A' c. "A" d. 129
____ is a valid char value.
46259
____ is a valid int value.
Application
____ programs perform a specific task.
Digital signals
____ represent information with a sequence of 0s and 1s.
True or False
A comma is also called a statement terminator.
compiler
A program called a ____ translates instructions written in high-level languages into machine code.
linker
A program called a(n) ____ combines the object program with the programs from libraries.
compiler
A program called a(n) ____ translates instructions written in high-level languages into machine code.
algorithm
A step-by-step problem-solving process in which a solution is arrived at in a finite amount of time is called a(n) ____.
disk compiler interpreter object
A(n) ____ consists of data and the operations on those data.
Double
An example of a floating point data type is ____.
structured
Dividing a problem into smaller subproblems is called ____ design.
operating system
The ____ monitors the overall activity of the computer and provides services.
semantic logical syntax grammatical
The ____ rules of a programming language tell you which statements are legal, or accepted by the programming language.
True
The basic commands that a computer performs are input (get data), output (display result), storage, and performance of arithmetic and logical operations.
False
The device that stores information permanently (unless the device becomes unusable or you change the information by rewriting it) is called primary storage.
...
The devices that the computer uses to display results are called ____ devices.
bit
The digit 0 or 1 is called a binary digit, or ____.
13
The expression static_cast<int>(6.9) + static_cast<int>(7.9) evaluates to ____.
...
The expression static_cast<int>(9.9) evaluates to ____.
16
The length of the string "computer science" is ____.
True?
The maximum number of significant digits in float values is up to 6 or 7.