Question: 1..Which statement would store a user-entered number into a variable named numQuiz? Select one: a. cin >> numQuiz b. cin < < numQuiz; c. cout
1..Which statement would store a user-entered number into a variable named numQuiz?
Select one:
a. cin >> numQuiz
b. cin << numQuiz;
c. cout << numQuiz
; d. cin >> numQuiz;
2..
What is the output of the following code?
int main() {
int y = 4; int z = 7;
cout << (z % y);
return 0;
}
Select one:
a. 1
b. 3
c. 7
d. 28
4...
Which statement defines an integer variable?
Select one:
a. short numSeconds;
b. int numSeconds;
c. unsigned long long numSeconds;
d. All of the above.
5..
Which is the first statement to contain an overflow?
int main() {
int x = 1000; int y = 10000; // A)
x = x * x; // B)
y = x * x * y; // C)
return 0;
}
Select one:
a. int x = 1000; int y = 10000;
b. x = x * y;
c. y = x * x * y;
d. No statement contains an overflow.
6..
What is main in C++?
Select one:
a. Used to denote a list of statements.
b. The starting place of a program.
c. Represents a particular memory location.
d. Textual representation of a program.
9..
What is the output of the following code?
int main() {
int x = 1; int y = 2;
cout << static_cast
return 0;
}
Select one:
a. 0
b. 0.5
c. 1
d. No output. Error in code.
11.
What is the output of the following code?
int main() {
double x = 2.0; double y = 3.0;
cout << pow(x, y);
return 0;
}
Select one:
a. 5
b. 6
c. 8
d. 9
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
