Computer Science Vocabulary Quiz One

¡Supera tus tareas y exámenes ahora con Quizwiz!

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

definition

Assume that a program has the following string object definition: string name;Which of the following statements correctly assigns a string literal to the string object?

name = "Jane";

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

null terminator

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

semicolon

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

single, double

The first step in using the string class is to #include the ________ header file.

string

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

string literal

What is the modulus operator?

%

What will the value of x be after the following statements execute? int x; x = 18 % 4;

2

Assuming you are using a system with 1-byte characters, how many bytes of memory will the following string literal occupy? "William"

8

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

99floats (Begins with number)

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

The file header< iostream>

________ represent storage locations in the computer's memory.

Variables

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

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

\t

Which data type typically requires only one byte of storage?

char

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

integers and floating point

Assume that a program has the following variable definition: char letter; Which of the following statements correctly assigns the character Z to the variable?

letter = 'Z';

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

literal


Conjuntos de estudio relacionados

Carrie's Chapter 15: Cardiorespiratory Training Concepts

View Set

Mastering Microbiology Chapter 13

View Set

NurseLogic: Nursing Concepts Advanced

View Set