11) What is an expression in C++
a. An expression is how you declare a variable
b. An expression describes whether a variable has a value or not
c. An expression is a compiler command
d. An expression is a programming statement that has a value
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++ 010
10) Can the cin object read in values of different types?
a. Yes, they must be all the same type
b. Yes, they can be different but separated by commas
c. Yes, only if the other type is a string
d. No, only one type.
a. Yes, they must be all the same type
b. Yes, they can be different but separated by commas
c. Yes, only if the other type is a string
d. No, only one type.
Chapter 3 Quiz Starting Out With C++ 009
9) What key is pressed after the last input value using cin
a. TAB
b. ENTER
c. SPACE
d. DOWNARROW
a. TAB
b. ENTER
c. SPACE
d. DOWNARROW
Chapter 3 Quiz Starting Out With C++ 009
9) What key is pressed after the last input value when you are using cin?
a. TAB
b. ENTER
c. SPACE
d. DOWNARROW
a. TAB
b. ENTER
c. SPACE
d. DOWNARROW
Exericse Number
Chapter 03,
Quiz
Chapter 3 Quiz Starting Out With C++ 008
8) What file must you include to get cin to work?
a. cin.h
b. input
c. iostream
d. keyboard
a. cin.h
b. input
c. iostream
d. keyboard
Chapter 3 Quiz Starting Out With C++ 006
6) >> is used for ____ and << is used for _____
a. input, output
b. output, input
c. cin, cout
d. cout, cin
a. input, output
b. output, input
c. cin, cout
d. cout, cin
Chapter 3 Quiz Starting Out With C++ 005
5) It is usually a good practice to display a prompt before gathering input
a. True
b. False
a. True
b. False
Chapter 3 Quiz Starting Out With C++ 004
4) What is the >> in C++
a. console standard input redirector
b. input funneling operator
c. stream extraction operator
d. all of the above
a. console standard input redirector
b. input funneling operator
c. stream extraction operator
d. all of the above
Chapter 3 Quiz Starting Out With C++ 003
3) How do you read in a value from the keyboard and assign it to variable number?
a. cin >> number;
b. cin << number;
c. cin > number;
d. cin < number;
a. cin >> number;
b. cin << number;
c. cin > number;
d. cin < number;
Chapter 3 Quiz Starting Out With C++ 002
2) What is the standard input object in C++
a. cin
b. cout
c. readLine()
d. dataRead()
a. cin
b. cout
c. readLine()
d. dataRead()
Chapter 3 Quiz Starting Out With C++ 001
1) How is input read in C++?
a. The cin object reads in input from the keyboard
b. The System.Console.Input function
c. Readline()
d. cin.dataRead()
a. The cin object reads in input from the keyboard
b. The System.Console.Input function
c. Readline()
d. cin.dataRead()
Subscribe to:
Posts (Atom)