You can use C++ as a procedural, as well as an object-oriented, language
Select an option to see the answer and solution.
A default catch block catches
A. all thrown objects
B. no thrown objects
C. any thrown object that has not been caught by an earlier catch block
D. all thrown objects that have been caught by an earlier catch block
Select an option to see the answer and solution.
Adding a derived class to a base class requires fundamental changes to the base class
Select an option to see the answer and solution.
Format flags may be combined using
A. the bitwise OR operator (|)
B. the logical OR operator (||)
C. the bitwise AND operator (&)
D. the logical AND operator (&&)
E. None of the above
Select an option to see the answer and solution.
The use of the break statement in a switch statement is
A. optional
B. compulsory
C. not allowed. It gives an error message
D. to check an error
E. None of these
Select an option to see the answer and solution.
To expose a data member to the program, you must declare the data member in the _____ section of the class
A. common
B. exposed
C. public
D. unrestricted
E. user
Select an option to see the answer and solution.
Evaluate the following expression: 3 >6&&7>4
Select an option to see the answer and solution.
Which of the following are valid characters for a numeric literal constant?
A. a comma
B. a dollar sign ($)
C. a percent sign (%)
D. a space
E. None of the above
Select an option to see the answer and solution.
A function that changes the state of the cout object is called a(n) _____
A. member
B. adjuster
C. manipulator
D. operator
Select an option to see the answer and solution.
A C++ program contains a function with the header int function(double d, char c). Which of the following function headers could be used within the same program?
A. char function(double d, char c)
B. int function(int d, char c)
C. both (a) and (b)
D. neither (a) nor (b)
Select an option to see the answer and solution.
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.
Some Streams work with input, and some with output
Select an option to see the answer and solution.
If you design a class that needs special initialization tasks, you will want to design a(n) _____
A. housekeeping routine
B. initializer
C. constructor
D. compiler
Select an option to see the answer and solution.
Which type of statement does not occur in computer programs?
A. sequence
B. loop
C. denial
D. selection
Select an option to see the answer and solution.
The newline character is always included between
A. pair of parentheses
B. pair of curly braces
C. control string
D. &
E. None of these
Select an option to see the answer and solution.
To be called object-oriented, a programming language must allow
A. functions that return only a single value
B. #include files
C. inheritance
D. All of the above
Select an option to see the answer and solution.
A function that returns no values to the program that calls it is _____
A. not allowed in C++
B. type void
C. type empty
D. type barren
Select an option to see the answer and solution.
The keyword used to define a structure is _____
A. stru
B. stt
C. struct
D. structure
Select an option to see the answer and solution.
If container classes are carefully constructed, then these tools are available to work with structures that are not ______
A. valid without container classes
B. programmer-defined
C. type-specific
D. public
Select an option to see the answer and solution.
Header files often have the file extension _____
Select an option to see the answer and solution.