Practice Test: Question Set - 31
1. One of the logical operators in the C language is represented by the symbol
- (A) AND
- (B) &&
- (C) >=
- (D) <=
2. Variable names known only to the procedure in which they are declared are ________
- (A) Local
- (B) Global
- (C) Recent
- (D) Internal
3. Another drawback to returning an error code from a function is that any error code returned by the function
- (A) Must
be of the same type as return type of the function
- (B) Must not be
a character
- (C) Cannot be
checked in a main() program
- (D) Can
have multiple meanings
4. Which of the following tells C++ to display numbers with zero decimal places?
- (A) setiosflags(0)
- (B) setiosflags(zero)
- (C) setprecision(0)
- (D) setprecision(zero)
5. You typically initialize Short Integer, Integer, and Long Integer variables to
- (A) A
space enclosed in double quotes
- (B) A
space enclosed in single quotes
- (C) The letter O
- (D) The number 0
6. You typically initialize a String variable to _______
- (A) An
asterisk
- (B) A
space enclosed in single quotes
- (C) The number 0
- (D) A
zero-length string
7. If no constructors can specified for a derived class, objects of the derived class will use the constructors in the base class
- (A) True
- (B) False
8. The prototype for a derived class constructor may include arguments for
- (A) Data members
of the derived class
- (B) Data members
of the base class
- (C) Both (a) and
(b)
- (D) Neither (a)
nor (b)
9. Simple routines that programmers use as place holders while a system is being tested are called _______.
- (A) Stubs
- (B) Stumps
- (C) Holders
- (D) Templates
10. Two access specifiers in C++ are
- (A) public
and private
- (B) int and
double
- (C) formal and informal
- (D) void and
free
11. An expression
- (A) Is
a collection of data objects and operators that can be evaluated to a single
value
- (B) Is
a name that substitutes for a sequence of characters
- (C) Causes
the computer to carry out some action
- (D) All
of the above
12. Private data can be accessed by
- (A) Class
member functions
- (B) Functions
in derived classes
- (C) Both (a) and
(b)
- (D) Neither (a)
nor (b)
13. Which is true?
- (A) Sequential
cohesion is slightly weaker than functional cohesion
- (B) Sequential
cohesion is slightly stronger than functional cohesion
- (C) Sequential
cohesion is much stronger than functional cohesion
- (D) Neither
sequential cohesion nor functional cohesion is stronger than the other
14. The statement float values[]={3.14, -7.86, 36.96, 4.87};
- (A) Assigns
36.96 to values[2]
- (B) Assigns
-7.86 to values[2]
- (C) Gives an
error message
- (D) Assign 14 to
values[2]
15. An exception specification begins with the keyword _______
- (A) Exception
- (B) Try
- (C) Throw
- (D) Catch
Next Tests: