C++ Chapter 2 Quiz

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Which data type typically requires only one byte of storage?

short

True/False: A preprocessor directive does not require a semicolon at the end.

True

A statement that starts with a # symbol is called a:

Preprocessor directive

The float data type is considered ________ precision, and the double data type is considered ________ precision.

single, double

A character literal is enclosed in ________ quotation marks, whereas a string literal is enclosed in ________ quotation marks.

single, double

This function in C++ allows you to identify how many bytes of storage on your computer system an integer data value requires.

sizeof

This is used to mark the end of a complete C++ programming statement.

Semicolon

________ represent storage locations in the computer's memory.

Variable

Which character signifies the beginning of an escape sequence?

\

The ________ is/are used to display information on the computer's screen.

cout objective

________ must be included in any program that uses the cout object.

the header file iostream

The ________ causes the contents of another file to be inserted into a program.

#include directive

What is the modulus operator?

%

Which one of the following would be an illegal variable name?

3dGraph

These are data items whose values do not change while the program is running.

Literals

In programming terms, a group of characters inside a set of quotation marks is called a(n):

String literal

If you use a C++ key word as an identifier, your program will:

not compile

You must have a ________ for every variable you intend to use in a program.

Definition

A variable's ________ is the part of the program that has access to the variable.

data type

A variable's ________ is the part of the program that has access to the variable.

function named main

Character constants in C++ are always enclosed in ________.

'single quotation marks'

For every opening brace in a C++ program, there must be a:

Closing Brace

In a C++ program, two slash marks ( // ) indicate:

The beginning of a comment

True/False: Escape sequences are always stored internally as a single character.

True

True/False: When typing in your source code into the computer, you must be very careful since most of your C++ instructions, header files, and variable names are case sensitive.

True

This control sequence is used to skip over to the next horizontal tab stop.

\t

These are used to declare variables that can hold real numbers.

integers

In memory, C++ automatically places a ________ at the end of string literals.

Quotation marks


Ensembles d'études connexes

Insurance and Risk Management Midterm

View Set

Hinkle Chapter 30: Management of Patients with Hematologic Neoplasms

View Set

Книга 연세 2-2 грамматики

View Set

Intermediate Macroeconomics Final

View Set

Unit 4 Political Organization of Space

View Set

Occupational Rehabilitation/Return to Work

View Set