61
Assuming the following three operators appear in an expression (without parentheses), which of the operators will be performed first?
A)
&&
B)
!
C)
||
D)
source code
Answer & Solution
Answer: Option
B
62
The code that you enter into a C++ program is called _____
A)
console code
B)
object code
C)
project code
D)
source code
Answer & Solution
Answer: Option
D
63
If a base class member is private, then
A)
if a derived class uses the public access specifier, the data member becomes public
B)
if a derived class uses the protected access specifier, the data member becomes protected
C)
both (a) and (b)
D)
neither (a) nor (b)
Answer & Solution
Answer: Option
D
64
Which of the following instructions tells C++ to merge the source code from the iostream.h file into the current file?
A)
#include <iostream.h>
B)
#include iostream.h
C)
/#include <iostream.h>
D)
#merge iostream.h
E)
None of the above
Answer & Solution
Answer: Option
E
65
The statement double total = 0.0; performs _____
A)
assignment
B)
initialization
C)
rationalization
D)
polymorphism
Answer & Solution
Answer: Option
B
66
The two parts of a function are the
A)
header and footer
B)
declarations and statements
C)
legs and feet
D)
header and body
Answer & Solution
Answer: Option
D
67
The general principle underlying object-oriented error handling is that a called function should __________
A)
neither check for, nor handle errors
B)
check for errors but not be required to handle any detected
C)
handle errors, but not check for them
D)
both check for and handle errors
Answer & Solution
Answer: Option
B
68
Which of the following is false?
A)
A void function's header begins with the keyword void
B)
A value-returning function's header begins with a data type, which represents the type of data the function will return
C)
Assuming displayAge is the name of a void function, displayAge(); is a both logically and syntactically valid C++ statement
D)
Assuming calcNewPrice is the name of a value-returning function, calcNewPriceO; is a both logically and syntactically valid C++ statement
E)
Both void and value-returning functions can receive arguments
Answer & Solution
Answer: Option
D
69
Reference variables and const class member
A)
must be assigned values in any derived class
B)
must never be initialized in a base class
C)
must be initialized, rather than assigned values
D)
must not exit if a class is to be a base class
Answer & Solution
Answer: Option
C
70
The actual arguments cannot he
A)
a constant or a variable
B)
of a different type from the corresponding formal arguments
C)
other functions
D)
expressions
E)
None of the above
Answer & Solution
Answer: Option
B