A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

1. You can use C++ as a procedural, as well as an object-oriented, language
a. True
b. False
c. May be
d. Can't say
View Answer Report Discuss Too Difficult!
Answer: (a).True

2. 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 (&&)
View Answer Report Discuss Too Difficult!
Answer: (a).the bitwise OR operator (|)

3. 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
View Answer Report Discuss Too Difficult!
Answer: (c).public

4. Which of the following are valid characters for a numeric literal constant?
a. a comma
b. a dollar sign ($)
c. a percent sign (%)
d. None of the above
View Answer Report Discuss Too Difficult!
Answer: (d).None of the above

5. A function that changes the state of the cout object is called a(n) _____
a. member
b. adjuster
c. manipulator
d. operator
View Answer Report Discuss Too Difficult!
Answer: (c).manipulator

6. Which type of statement does not occur in computer programs?
a. sequence
b. loop
c. denial
d. selection
View Answer Report Discuss Too Difficult!
Answer: (c).denial

7. The newline character is always included between
a. pair of parentheses
b. pair of curly braces
c. control string
d. &
View Answer Report Discuss Too Difficult!
Answer: (c).control string

8. 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
View Answer Report Discuss Too Difficult!
Answer: (c).inheritance

9. The #ifndef directive tests to see whether ________
a. a class has been defined
b. a variable has been given a value
c. a class has no variable definitions
d. any objects of the class have been instantiated
View Answer Report Discuss Too Difficult!
Answer: (a).a class has been defined

10. The step-by-step instructions that solve a problem are called _____
a. an algorithm
b. a list
c. a plan
d. a sequential structure
View Answer Report Discuss Too Difficult!
Answer: (a).an algorithm

Page 1 of 40