Filters
Question type

Study Flashcards

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


A) binary
B) bool
C) T/F
D) float
E) None of the above.

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

Correct Answer

verifed

verified

How would you consolidate 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) C) and D)
G) A) and C)

Correct Answer

verifed

verified

What will the following code display? cout << "Monday"; Cout << "Tuesday"; Cout << "Wednesday";


A) Monday
Tuesday
Wednesday
B) Monday Tuesday Wednesday
C) MondayTuesdayWednesday
D) "Monday"
"Tuesday"
"Wednesday"

E) B) and D)
F) B) and C)

Correct Answer

verifed

verified

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


A) String literal
B) Variable
C) Operation
D) Statement
E) None of the above

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

Correct Answer

verifed

verified

Floating point constants are normally stored in memory as doubles.

A) True
B) False

Correct Answer

verifed

verified

A variable called "average" should be declared as an integer data type because it will probably hold data that contains decimal places.

A) True
B) False

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) B) and D)
G) B) 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) B) and D)
G) A) and B)

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) B) and C)
F) B) and D)

Correct Answer

verifed

verified

What is the output of the following statement? cout << 4 * (15 / (1 + 3) ) << endl;


A) 15
B) 12
C) 63
D) 72
E) None of these

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

Correct Answer

verifed

verified

In the C++ instruction, cookies = number % children; Given the following declaration statement: Int number = 38, children = 4, cookies; What is the value of cookies after the execution of the statement?


A) 2
B) 0
C) 9
D) .5
E) None of these

F) C) and D)
G) B) and D)

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) B) and D)

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

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

Correct Answer

verifed

verified

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


A) data Type
B) value
C) scope
D) reach
E) None of the above

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

Correct Answer

verifed

verified

Which data type typically requires only one byte of storage?


A) short
B) int
C) float
D) char
E) double

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

Correct Answer

verifed

verified

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


A) Backslash
B) Pound sign
C) Semicolon
D) #include directive
E) None of the above

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

Correct Answer

verifed

verified

Showing 41 - 56 of 56

Related Exams

Show Answer