Programming C++ - Test 1

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

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

#include directive

What is the modulus operator?

%

A statement that starts with a # symbol is called a

Preprocessor directive

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

Single quotes

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

The beginning of a comment

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

The header file iostream

Which character signifies the beginning of an escape sequence

\

Which escape sequence causes the cursor to move to the beginning of the current line?

\r

A variable whose value can be either true or false is of this data type

bool

This stream manipulator forces cout to print the digits in fixed-point notation

fixed

The numeric data types in C++ can be broken into two general categories:

integer and floating point

In any program that uses the cin object, you must include the ________.

iostream header file

This manipulator causes the field to be left-justified with padding spaces printed to the right.

left

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

literals

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

scope

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

single, double

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

single, double

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

string literal

________ represent storage locations in the computer's memory.

variables

Of the following, which is a valid C++ identifier?

All of these are valid identifiers.

Which data type typically requires only one byte of storage?

char

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

cout object


Kaugnay na mga set ng pag-aaral

Pediatric Nurse Practitioner Exam

View Set

English II Frankenstein Chapter 11-15

View Set