Chapter 3 Quiz Starting Out With C++ 011

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

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.

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

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

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

Chapter 3 Quiz Starting Out With C++ 007

7) Can cin read in more than one value?

a. True
b. False

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

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

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

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;

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()

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()

Chapter 2 Quiz Starting Out With C++ 020

20) An escape sequence starts with a double quote?

a. True
b. False

Chapter 2 Quiz Starting Out With C++ 019

19) cout can only output one item per line?

a. True
b. False

Chapter 2 Quiz Starting Out With C++ 018

18) The # symbol marks the beginning of what?

a. a program
b. preprocessor directive
c. comment
d. None of the Above

Chapter 2 Quiz Starting Out With C++ 017

17) Forgetting either an opening { or closing } brace is a common reason a C++ program won't compile

a. True
b. False

Chapter 2 Quiz Starting Out With C++ 016

16) What character terminates C++ statements?

a. space
b. semicolon
c. endl
d. none

Chapter 2 Quiz Starting Out With C++ 015

15) What function is required by all C++ programs?

a. init
b. processor
c. syntax analyzer
d. main

Chapter 2 Quiz Starting Out With C++ 014

14) A function is a group of one or more statements that collectively has a name?

a. True
b. False

Chapter 2 Quiz Starting Out With C++ 013

13) C++ uses namespaces to:

a. organize the names of program entities
b. to make entities easier to find
c. speed up compiling
d. make programs easier to read

Chapter 2 Quiz Starting Out With C++ 012

12) The preprocessor directive, #include <iostream>, is required for all C++ programs

a. True
b. False

Chapter 2 Quiz Starting Out With C++ 011

11) What marks the beginning of a comment in a C++ program?

a. // (The double slash)
b. ' (The single quote'
c. REM
d. COMMENT:

Chapter 2 Quiz Starting Out With C++ 010

10) What is the header file that has to be included to allow access to the file?

a. file
b. fileaccess
c. fstream
d. cfile

Chapter 2 Quiz Starting Out With C++ 009

9) You can not store a string in an array of characters.

a. True
b. False

Chapter 2 Quiz Starting Out With C++ 008

8) There are more differences between the get function and the >> operator than that get reads the first character typed, even if it is a space, tab, or the [Enter] key.

a. True
b. False

Chapter 2 Quiz Starting Out With C++ 007

7) You need to enter the length, width, and height while executing a program. Which cin statement should be used from the following?

a. cin << length, width, height;
b. cin.get(length, width, height);
c. cin >> length >> width >> height;
d. cin >> length, width, height;

Chapter 2 Quiz Starting Out With C++ 006

6) One of the following will make a program to remain inactive until information will be entered at the keyboard and the user presses the Enter key.

a. Output stream
b. cin object
c. cout object
d. Preprocessor

Chapter 2 Quiz Starting Out With C++ 005

5) When a variable is used to assign a value that will be the result of an expression, it will be changed to:

a. The smallest C++ data type
b. The largest C++ data type
c. The data type of the variable
d. The data type of the expression

Chapter 2 Quiz Starting Out With C++ 004

4) If you wanted to have a number being displayed in scientific notation, you may use the Fixed manipulator.

a. True
b. False

Chapter 2 Quiz Starting Out With C++ 003

3) The setprecision manipulator will be the exact number of digits to show before the decimal point in case of the fixed manipulator.

a. True
b. False

Chapter 2 Quiz Starting Out With C++ 002

2) When an object, that is used to enter data by the user, like the cin object, the following ___________must be with it.

a. compiler
b. iostream header file
c. linker
d. >> and << operators

Chapter 2 Quiz Starting Out With C++ 001

1) You can display in C++ the number 45.211 in a field of 9 spaces with 2 decimal places.

a. True
b. False

Chapter 1 Quiz Starting Out With C++ 027

Which statement is true

a. C++ is object-oriented
b. C is object-oriented
c. C can run all C++ programs
d. All of the above

Chapter 1 Quiz Starting Out With C++ 026

C++ can be used to do the following type of programming

a. Procedural
b. object-oriented
c. Both a and b
d. None of the above

Chapter 1 Quiz Starting Out With C++ 025

It is very common for commercial software to be developed by one programmer

a. True
b. False

Chapter 1 Quiz Starting Out With C++ 024

A software engineer does the following

a. Designs
b. Writes
c. Tests
d. All of the above

Chapter 1 Quiz Starting Out With C++ 023

C++ is not popular because it is portable


a. True
b. False

Chapter 1 Quiz Starting Out With C++ 022

C, C++, C# and Java are considered

a. Machine languages
b. High level languages
c. Binary languages
d. 4th Generation languages

Chapter 1 Quiz Starting Out With C++ 021

A compiler falls into what type of systems software

a. Operating Systems
b. Utility Programs
c. Software Development Tools
d. All of the above

Chapter 1 Quiz Starting Out With C++ 020

Microsoft Word would considered an operating system program

a. True
b. False

Chapter 1 Quiz Starting Out With C++ 019

Which of the following use flash memory

a. DVD
b. CD
c. USB Drive
d. Floppy Disk Drive

Chapter 1 Quiz Starting Out With C++ 018

Most computers have a disk drive installed inside their case

a. True
b. False

Chapter 1 Quiz Starting Out With C++ 017

The difference between RAM and ROM

a. Nothing
b. Contents of RAM remain after you turn off the computer
c. Contents of ROM remain after you turn off the computer
d. ROM is back up storage when RAM is filled

Chapter 1 Quiz Starting Out With C++ 016

What is the next step after fetch and decode?

a. End
b. Enter
c. Execute
d. None of the above

Chapter 1 Quiz Starting Out With C++ 015

The CPU consists of three parts: control unit, arithmetic and logic unit, and cooling unit

a. True
b. False

Chapter 1 Quiz Starting Out With C++ 014

What does CPU stand for:

a. Centrally Positioned Unit
b. Central Processing Unit
c. Core Processing Utility
d. Core Positioned Utility

Chapter 1 Quiz Starting Out With C++ 013

All professional programmers create software that runs correctly the first time.

a. True
b. False

Chapter 1 Quiz Starting Out With C++ 012

A person that creates software is called a:

a. Software developer
b. Programmer
c. Software engineer
d. All of the above
e. None of the above

Chapter 1 Quiz Starting Out With C++ 011

In C++, key words are written in all lowercase letters.

a. True
b. False

Chapter 1 Quiz Starting Out With C++ 010

The preprocessor executes after the compiler.

a. True
b. False

Chapter 1 Quiz Starting Out With C++ 009

This step will uncover any syntax errors in your program.

a. Editing
b. Compiling
c. Linking
d. Executing

Chapter 1 Quiz Starting Out With C++ 008

Programs are commonly called:

a. Execution statements
b. Software
c. By the operating System
d. Automatically when clicked

Chapter 1 Quiz Starting Out With C++ 007

A CPU really only understands instructions that are written in machine language.

a. True
b. False

Chapter 1 Quiz Starting Out With C++ 006

Three primary activities of a program are:

a. Variables, Operators, and Key Words
b. Lines, Statements, and Punctuation
c. Input, Processing, and Output
d. Integer, Floating-point and Character

Chapter 1 Quiz Starting Out With C++ 005

Programmer-defined names of memory locations that may hold data are:

a. Operators
b. Variables
c. Syntax
d. Operands

Chapter 1 Quiz Starting Out With C++ 004

An Integrated Development Environment typically consists of:

a. A text editor
b. A compiler
c. A debugger
d. All of the above

Chapter 1 Quiz Starting Out With C++ 003

The preprocessor executes after the compiler.

a. True
b. False

Chapter 1 Quiz Starting Out With C++ 002


The programming process consists of several steps, which include:

a. Input, Processing, and Output
b. Key Words, Operators, and Punctuation
c. Design, Creation, Testing, and Debugging
d. Syntax, Logic, and Error Handling

Chapter 1 Quiz Starting Out With C++ 001

Which of the following best describes an operator?

a. An operator is a rule that must be followed when constructing a program.
b. An operator allows you to perform operations on one or more pieces of data.
c. An operator marks the beginning or ending of a statement, or is used to separate items in a list.
d. An operator is a word that has a special meaning.