1. (TCO 4) What is the result of 57 % 8? (Points : 1) 1 7 7.125 8 2. (TCO 4) Whi
ID: 3542739 • Letter: 1
Question
1. (TCO 4) What is the result of 57 % 8? (Points : 1) 17
7.125
8
2. (TCO 4) Which file must be #include to use cout? (Points : 1) cmath
iostream
iomanip
isprint
3. (TCO 4) Which statement correctly tests int variable var to be less than 0 or more than 50? (Points : 1) if(var < 0 && var > 50)
if(var < 0 else var > 50)
if(var <= 0 || var >= 50)
if(var < 0 || var > 50)
4. (TCO 4) How many times does the following loop execute?
unsigned int count = 365;
for(int i = 0; i <= 100; i+=2)
cout << count - i; (Points : 1) 365
50
51
Indefinite; it is an infinite loop.
5. (TCO 4) What is the output for the following code fragment?
int var1 = 20;
cout << --var1;
cout << var1++; (Points : 1) 1920
1919
2020
2021
6. (TCO 4) A variable declared within a block is visible (Points : 1) from the point of declaration onward to the end of the function.
from the point of declaration onward to the end of the block.
from the point of declaration onward to the end of the program.
throughout the entire program.
7. (TCO 4) Assign the value 123.4 to the element in the sixth row and fourth column of data.
double data[10][50]; (Points : 1) data[6][4] = 123.4;
data[4][6] = 123.4;
data[5][3] = 123.4;
data[3][5] = 123.4; 2. (TCO 4) Which file must be #include to use cout? (Points : 1) cmath
iostream
iomanip
isprint
Explanation / Answer
1. A.1
2.iostream
3.if(var < 0 || var > 50)
4 51
5.1919
6.from the point of declaration onward to the end of the function.
7.data[6][4] = 123.4;
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.