Filters
Question type

Study Flashcards

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


A) \n
B) \t
C) \a
D) \b
E) \r

F) A) and D)
G) B) and E)

Correct Answer

verifed

verified

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


A) Opening and closing braces
B) Opening and closing quotation marks
C) cout object
D) Backslash
E) None of the above

F) All of the above
G) B) and D)

Correct Answer

verifed

verified

C

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

A) True
B) False

Correct Answer

verifed

verified

True

What will the following code display? What will the following code display?   A)    B)    C)    D)


A) What will the following code display?   A)    B)    C)    D)
B) What will the following code display?   A)    B)    C)    D)
C) What will the following code display?   A)    B)    C)    D)
D) What will the following code display?   A)    B)    C)    D)

E) All of the above
F) A) and B)

Correct Answer

verifed

verified

What will the value of x be after the following statements execute? Int x; X = 18 / 4;


A) 4.5
B) 4
C) 0
D) unknown

E) C) and D)
F) A) and D)

Correct Answer

verifed

verified

What will the value of x be after the following statements execute? Int x; X = 18.0 / 4;


A) 4.5
B) 4
C) 0
D) unknown

E) All of the above
F) A) and B)

Correct Answer

verifed

verified

In C++ 11, the ________ tells the compiler to determine the variable's data type from the initialization value.


A) auto key word
B) #include preprocessor directive
C) variable's name
D) dynamic_cast key word
E) None of the above

F) A) and E)
G) A) and B)

Correct Answer

verifed

verified

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


A) [brackets]
B) "double quotation marks"
C) 'single quotation marks'
D) {braces}
E) (parentheses)

F) D) and E)
G) A) and B)

Correct Answer

verifed

verified

Floating point constants are normally stored in memory as doubles.

A) True
B) False

Correct Answer

verifed

verified

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


A) 0.45
B) 4
C) 2
D) unknown

E) All of the above
F) B) and C)

Correct Answer

verifed

verified

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


A) dayOfWeek
B) 3dGraph
C) _employee_num
D) June1997
E) itemsorderedforthemonth

F) B) and E)
G) A) and B)

Correct Answer

verifed

verified

Which of the following correctly consolidates the following declaration statements into one statement? Int x = 7; Int y = 16; Int z = 28;


A) int x = 7; y = 16; z = 28;
B) int x = 7   y = 16   z = 28;
C) int x, y, z = 7, 16, 28
D) int x = 7, y = 16, z = 28;
E) None of these will work.

F) A) and D)
G) A) and B)

Correct Answer

verifed

verified

Look at the following program and answer the question that follows it. Look at the following program and answer the question that follows it.   Which line(s)  in this program cause output to be displayed on the screen? A) 13 and 14 B) 8 and 9 C) 14 D) 13 E) 15 Which line(s) in this program cause output to be displayed on the screen?


A) 13 and 14
B) 8 and 9
C) 14
D) 13
E) 15

F) A) and B)
G) D) and E)

Correct Answer

verifed

verified

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


A) Semicolon
B) Quotation marks
C) Null terminator
D) Newline escape sequence
E) None of the above

F) B) and E)
G) A) and E)

Correct Answer

verifed

verified

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


A) String literal
B) Function
C) Variable
D) Closing brace
E) None of the above

F) C) and D)
G) C) and E)

Correct Answer

verifed

verified

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


A) Execute with unpredictable results
B) not compile
C) understand the difference and run without problems
D) Compile, link, but not execute
E) None of the above

F) A) and D)
G) A) and C)

Correct Answer

verifed

verified

Every complete C++ program must have a ________.


A) comment
B) function named main
C) preprocessor directive
D) symbolic constant
E) cout statement

F) C) and D)
G) A) and D)

Correct Answer

verifed

verified

B

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


A) letter = Z;
B) letter = "Z";
C) letter = 'Z';
D) letter = (Z) ;

E) None of the above
F) All of the above

Correct Answer

verifed

verified

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.

A) True
B) False

Correct Answer

verifed

verified

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


A) Pound Sign
B) Semicolon
C) Data type
D) Void
E) None of the above

F) C) and D)
G) A) and D)

Correct Answer

verifed

verified

Showing 1 - 20 of 60

Related Exams

Show Answer