Exam 2: Introduction to C++

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

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

(Multiple Choice)
4.8/5
(87)

What will the following code display? int number = 7; Cout << "The number is " << "number" << endl;

(Multiple Choice)
4.7/5
(86)

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

(Multiple Choice)
4.9/5
(87)

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?

(Multiple Choice)
4.7/5
(86)

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/False)
4.9/5
(81)

What is the modulus operator?

(Multiple Choice)
4.8/5
(82)

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

(Multiple Choice)
4.8/5
(69)

The C++ language requires that you give variables names that indicate what the variables are used for.

(True/False)
4.9/5
(75)

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

(Multiple Choice)
4.9/5
(82)

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

(Multiple Choice)
4.9/5
(79)

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

(Multiple Choice)
4.8/5
(84)

C++ does not have a built in data type for storing strings of characters.

(True/False)
4.8/5
(78)

What will the following code display? cout << "Four " << "score "; cout << "and " << "seven/n"; cout << "years" << "ago" << endl;

(Multiple Choice)
4.8/5
(75)

Which of the following defines a double-precision floating point variable named payCheck?

(Multiple Choice)
4.7/5
(88)

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

(Multiple Choice)
4.9/5
(80)

Escape sequences are always stored internally as a single character.

(True/False)
4.9/5
(86)

A preprocessor directive does not require a semicolon at the end.

(True/False)
4.9/5
(90)

What will the following code display? int x = 0, y = 1, z = 2; Cout << x << y << z << endl;

(Multiple Choice)
4.8/5
(73)

Besides decimal, two other number systems you might encounter in C++ programs are:

(Multiple Choice)
4.9/5
(81)

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

(Multiple Choice)
5.0/5
(83)
Showing 21 - 40 of 56
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)