Filters
Question type

Study Flashcards

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)

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

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.

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

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

Correct Answer

verifed

verified

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

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

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.

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

Correct Answer

verifed

verified

C

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


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

Correct Answer

verifed

verified

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) ;

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

Correct Answer

verifed

verified

Floating point constants are normally stored in memory as doubles.

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

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

True

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

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

Correct Answer

verifed

verified

B

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

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

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)

Correct Answer

verifed

verified

Showing 1 - 20 of 60

Related Exams

Show Answer