When the compiler cannot differentiate between two overloaded constructors, they are called______
A. overloaded
B. destructed
C. ambiguous
D. dubious
Select an option to see the answer and solution.
A function argument is
A. a variable in the function that receives a value from the calling program
B. a way that functions resist accepting the calling program's values
C. a value sent to the function by the calling program
D. a value returned by the function to the calling program
E. None of the above
Select an option to see the answer and solution.
A function that is prototyped as double calculate(int num); may______
A. receive an integer constant such as 5
B. receive an integer variable
C. either (a) or (b)
D. neither (a) nor (b)
Select an option to see the answer and solution.
Passing a variable pointer as a constant _____
A. protects the contents pointed to by the pointer from change
B. eliminates the need to name the pointer in the function
C. eliminates the need to give the pointer a type in the function
D. causes a copy of the pointer to be produced in the function
Select an option to see the answer and solution.
Recursive Functions
A. easier to code
B. executable faster than iterative ones
C. takes less main storage space
D. necessary to solve a certain class of problems
E. None of the above
Select an option to see the answer and solution.
The purpose of a conditional operator is to
A. select one of the two values
B. select the highest of the two values
C. select one of the two values depending on a condition
D. select the more equal of the two values
E. None of the above
Select an option to see the answer and solution.
Which of the following, if any, are valid names for variables?
A. amt.Sold
B. amt-Sold
C. amt_Sold
D. 98Sold
E. None of the above are valid names for variables
Select an option to see the answer and solution.
Assume you want to compare the character stored in the initial variable to the letter a. Which of the following conditions should you use in the if statement? (Be sure the condition will handle a or A.)
A. (initial = 'a' or 'A')
B. (initial == 'a' or 'A')
C. (toupper(initial) = 'A')
D. (toupper(initial) == 'A')
Select an option to see the answer and solution.
You can override a class's inherited access to make an individual member's access more ______
A. liberal
B. conservative
C. either (a) or (b)
D. neither (a) nor (b)
Select an option to see the answer and solution.
A class hierarchy
A. describes "is a kind of" relationships
B. describes "has a" relationships
C. shows the same relationships as an organization chart
D. shows the same relationships as a family tree
Select an option to see the answer and solution.
Which of the following C++ expressions is equivalent to the mathematical expression 53 ?
A. 5 ^ 3
B. cube(5)
C. pow(3, 5)
D. pow(5, 3)
E. sqrt(5, 3)
Select an option to see the answer and solution.
The right shift operator is represented by the symbol
A. >
B. >>
C. →
D. <
E. None of the above
Select an option to see the answer and solution.
In C++, class definitions are most often
A. stored with each program that uses them
B. stored in a header file that is included in the programs that use them
C. stored in a folder that you paste into every new project
D. retyped for every new project
Select an option to see the answer and solution.
The comma operator (,) is primarily used in conjunction with
A. 'for' statement
B. 'if-else' statement
C. 'do-while' statement
D. All of the above
E. None of the above
Select an option to see the answer and solution.
To execute a C++ program, you first need to translate the source code into object code. This process is called
A. coding
B. compiling
C. sourcing
D. translating
Select an option to see the answer and solution.
The rules of a programming language are called its _____
A. code
B. guidelines
C. procedures
D. regulations
E. syntax
Select an option to see the answer and solution.
An array element is accessed using
A. a first-in-first-out approach
B. the dot operator
C. a member name
D. an index number
Select an option to see the answer and solution.
The program can access the private members of a class
A. directly
B. only through other private members of the class
C. only through other public members of the class
D. None of the above - the program cannot access the private members of a class in any way
Select an option to see the answer and solution.
To hide a data member from the program, you must declare the data member in the _____ section of the class.
A. concealed
B. confidential
C. hidden
D. private
E. restricted
Select an option to see the answer and solution.
External documentation includes
A. a printout of the program's code
B. flowcharts
C. IPO charts
D. pseudocode
E. All of the above
Select an option to see the answer and solution.