0% found this document useful (0 votes)
395 views3 pages

AMCAT Abstraction Questions

This document contains 10 questions and answers about object-oriented programming concepts like abstraction, encapsulation, inheritance, polymorphism, and abstract classes. The questions cover topics such as the number of instances that can be created from an abstract class, examples of abstract data types, how classes protect code through access specifiers, using inheritance to define hierarchical features for classes, and identifying a word related to inheritance hierarchies that was not said.

Uploaded by

Prateek Baderia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
395 views3 pages

AMCAT Abstraction Questions

This document contains 10 questions and answers about object-oriented programming concepts like abstraction, encapsulation, inheritance, polymorphism, and abstract classes. The questions cover topics such as the number of instances that can be created from an abstract class, examples of abstract data types, how classes protect code through access specifiers, using inheritance to define hierarchical features for classes, and identifying a word related to inheritance hierarchies that was not said.

Uploaded by

Prateek Baderia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

AMCAT Abstraction Questions

Question 1
How many instances of an abstract class can be created?
A.1
B.5
C.13
D.0
Answer: Option D

Question 2
Which of the following is an abstract data type?
A.int
B. double
C. string
D. Class
Answer: Option D

Question 3
Which of the following concepts of OOPS means exposing only necessary information to client?
A. Abstraction
B. Encapsulation
C .Data hiding
D. Data binding
Answer: Option D

Question 4
Which of the following cannot be inherited?
A. Friend
B. Static
C. Destructor
D. None of the above
Answer: Option B

Question 5
Which type of inheritance needs a virtual function:
A. Multi level inheritance
B. Multiple inheritance
C. Hybrid inheritance
D. All the above
Answer: Option D

Question 6
A virtual function that has no definition within the base class is called?
A. Pure virtual function
B. Pure static function
C. Pure Const function
D. Virtual Function
Answer: Option A

Question 7
Syntax for Pure Virtual Function is?
A. virtual void show()==0
B. void virtual show()==0
C. virtual void show()=0
D. void virtual show()=0
Answer: Option A

Question 8
How will a class protect the code inside it?
A. Using Access specifiers
B. Abstraction
C. Use of Inheritance
D. All of the mentioned
Answer: Option A
Explanation: Each method or variable in a class may be marked ‘public’ or ‘private’. They are
called Access Specifiers.

Question 9
Shankar works all night long writing code and writing more and more classes for each object he
now thinks that he can write a superclass which defines some hierarchical feature for other
classes, what can he use?
A. Cascading
B. Hierachical Super Positioning
C. Inheritance
D. Polymorphism

Answer: Option C
Question 10
Pooja wants to write code for his computer class homework but he had misheard the teacher
and only can recollect remembering this 4 words. Which of the following is what he couldn’t
have had heard?
A. Distributive
B. Multilevel
C. Multiple
D. Hierarchical
Answer: Option A

You might also like