What is an Overflow
a. When you try to use a value larger the the data type of the variable
b. When the computer runs out of memory
c. When a variable is uninitialized
d. None of the above
Answers for C++ Course using "Starting out with C++ : from control structures through objects" by Tony Gaddis. 7/8th ed. I used the Pearson myprogramminglab to complete the homework. Here are my solutions/answers for the exercises/labs so please use the test bank as a GUIDE if you're stuck. Let me know if you find a better solution to a problem or any of the programming challenges. Thanks in advance for your support! Send in missing programming challenges to cplusplus.answers@gmail.com
Chapter 3 Quiz Starting Out With C++ 022
In C++, if you divide the integers 7 by 2 the answer will be
a. 3.5
b. 3
c. 2
d. undefined since the answer is a float
a. 3.5
b. 3
c. 2
d. undefined since the answer is a float
Chapter 3 Quiz Starting Out With C++ 021
When the final value of an expression is assigned to a variable, it will be converted
to the data type of that variable.
a. True
b. False
to the data type of that variable.
a. True
b. False
Chapter 3 Quiz Starting Out With C++ 020
When an operator works with two values of different data types, the lower-ranking
value is promoted to the type of the higher-ranking value.
a. True
b. False
value is promoted to the type of the higher-ranking value.
a. True
b. False
Chapter 3 Quiz Starting Out With C++ 019
chars, shorts, and unsigned shorts are automatically promoted to type int.
a. True
b. False
a. True
b. False
Chapter 3 Quiz Starting Out With C++ 018
What happens in C++ when operator's operands are of different types?
a. Nothing
b. C++ will convert to the same data type
c. C++ will convert to the largest data type
d. C++ will convert to the lowest data type
a. Nothing
b. C++ will convert to the same data type
c. C++ will convert to the largest data type
d. C++ will convert to the lowest data type
Subscribe to:
Posts (Atom)