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.

71. Which among the following is not a use of object?
a. Defining a member function
b. Accessing data members
c. Creating instance of a class
d. Using class members
View Answer Report Discuss Too Difficult!
Answer: (a).Defining a member function

72. Which object can be used to access the standard input?
a. System.inner
b. cin
c. System.stdin
d. console.input
View Answer Report Discuss Too Difficult!
Answer: (b).cin

73. A single object can be used __________________
a. As only two class types at a time
b. As only three class types at a time
c. As only one class type at a time
d. As of as many class types as required
View Answer Report Discuss Too Difficult!
Answer: (c).As only one class type at a time

74. If same object name is given to different objects of different class then _____________
a. Its compile time error
b. Its runtime error
c. It’s not an error
d. Program suns smooth
View Answer Report Discuss Too Difficult!
Answer: (a).Its compile time error

75. Which among the following best describes abstract classes?
a. If a class has more than one virtual function, it’s abstract class
b. If a class have only one pure virtual function, it’s abstract class
c. If a class has at least one pure virtual function, it’s abstract class
d. If a class has all the pure virtual functions only, then it’s abstract class
View Answer Report Discuss Too Difficult!
Answer: (c).If a class has at least one pure virtual function, it’s abstract class

76. Can abstract class have main() function defined inside it?
a. Yes, depending on return type of main()
b. Yes, always
c. No, main must not be defined inside abstract class
d. No, because main() is not abstract function
View Answer Report Discuss Too Difficult!
Answer: (b).Yes, always

77. If there is an abstract method in a class then, ________________
a. Class must be abstract class
b. Class may or may not be abstract class
c. Class is generic
d. Class must be public
View Answer Report Discuss Too Difficult!
Answer: (a).Class must be abstract class

78. If a class is extending/inheriting another abstract class having abstract method, then _______________________
a. Either implementation of method or making class abstract is mandatory
b. Implementation of the method in derived class is mandatory
c. Making the derived class also abstract is mandatory
d. It’s not mandatory to implement the abstract method of parent class
View Answer Report Discuss Too Difficult!
Answer: (a).Either implementation of method or making class abstract is mandatory

79. Abstract class A has 4 virtual functions. Abstract class B defines only 2 of those member functions as it extends class A. Class C extends class B and implements the other two member functions of class A. Choose the correct option below.
a. Program won’t run as all the methods are not defined by B
b. Program won’t run as C is not inheriting A directly
c. Program won’t run as multiple inheritance is used
d. Program runs correctly
View Answer Report Discuss Too Difficult!
Answer: (d).Program runs correctly

80. Abstract classes can ____________________ instances.
a. Never have
b. Always have
c. Have array of
d. Have pointer of
View Answer Report Discuss Too Difficult!
Answer: (a).Never have