OOP MCQ's - Final

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

ZEAL EDUCATION SOCIETY’S

ZEAL POLYTECHNIC,PUNE
NARHE │PUNE -41 │ INDIA
DEPARTMENT OF CIVIL ENGINEERING

Question Bank for Multiple Choice Questions

Program: Diploma in Computer engineering Program Code:- CO


Scheme:-I Semester:- 3
Course:- Object Oriented Programming Course Code:- 22316

01 – Principles of Object Oriented Programming Marks:-14


Content of Chapter:-
1.1 Its need & requirement, Procedure Oriented Programming (POP) verses Object Oriented Programming
(OOP)
1.2 Basic concepts of Object Oriented Programming, Object Oriented Languages, Applications of OOP.
1.3 C verses C++,structure of c++ program, simple c++ program.
1.4 Token ,keywords, variables, constants ,basic data types, user data types, type casting
operator,expression
1.5 Control structors: Decision making statements and loops.
1.6 Scope resolution operator, memory management operator.
1.7 Array ,Strings and structure in C++.

1. Which was the first purely object oriented programming language developed?
a) Java
b) C++
c) SmallTalk
d) Kotlin

Answer: c
Explanation: SmallTalk was the first programming language developed which was purely object oriented. It
was developed by Alan Kay. OOP concept came into the picture in 1970’s.

2. Which of the following best defines a class?


a) Parent of an object
b) Instance of an object
c) Blueprint of an object
d) Scope of an object

Answer: c
Explanation: A class is Blueprint of an object which describes/ shows all the functions and data that are
provided by an object of a specific class. It can’t be called as parent or instance of an object. Class in
general describes all the properties of an object.

3. Who invented OOP?


a) Alan Kay

Page 1 of 19
b) Andrea Ferro
c) Dennis Ritchie
d) Adele Goldberg

Answer: a
Explanation: Alan Kay invented OOP, Andrea Ferro was a part of SmallTalk Development. Dennis invented
C++ and Adele Goldberg was in team to develop SmallTalk but Alan actually had got rewarded for OOP.

4. What is the additional feature in classes that was not in structures?


a) Data members
b) Member functions
c) Static data allowed
d) Public access specifier

Answer: b
Explanation: Member functions are allowed inside a class but were not present in structure concept. Data
members, static data and public access specifiers were present in structures too.

5. Which is not feature of OOP in general definitions?


a) Code reusability
b) Modularity
c) Duplicate/Redundant data
d) Efficient Code

Answer: c
Explanation: Duplicate/Redundant data is dependent on programmer and hence can’t be guaranteed by
OOP. Code reusability is done using inheritance. Modularity is supported by using different code files and
classes. Codes are more efficient because of features of OOP.

6. Pure OOP can be implemented without using class in a program. (True or False)
a) True
b) False

Answer: b
Explanation: It’s false because for a program to be pure OO, everything must be written inside classes. If
this rule is violated, the program can’t be labelled as purely OO.

7. Which Feature of OOP illustrated the code reusability?


a) Polymorphism
b) Abstraction
c) Encapsulation
d) Inheritance

Answer: d
Explanation: Using inheritance we can reuse the code already written and also can avoid creation of many
new functions or variables, as that can be done one time and be reused, using classes.

8. Which language does not support all 4 types of inheritance?


a) C++
b) Java
Page 2 of 19
c) Kotlin
d) Small Talk

Answer: b
Explanation: Java doesn’t support all 4 types of inheritance. It doesn’t support multiple inheritance. But the
multiple inheritance can be implemented using interfaces in Java.

9. How many classes can be defined in a single program?


a) Only 1
b) Only 100
c) Only 999

d) As many as you want

Answer: d
Explanation: Any number of classes can be defined inside a program, provided that their names are
different. In java, if public class is present then it must have the same name as that of file.

10. When did the OOP concept first come into picture?
a) 1970’s
b) 1980’s
c) 1993
d) 1995

Answer: a
Explanation: OOP first came into picture in 1970’s by Alan and his team. Later it was used by some
programming languages and got implemented successfully, SmallTalk was first language to use pure OOP
and followed all rules strictly.

11. Which concept of OOP is false for C++?


a) Code can be written without using classes
b) Code must contain at least one class
c) A class must have member functions
d) At least one object should be declared in code

Answer: b
Explanation: In C++, it’s not necessary to use classes, and hence codes can be written without using OOP
concept. Classes may or may not contain member functions, so it’s not a necessary condition in C++. And,
an object can only be declared in a code if its class is defined/included via header file.

12. Which header file is required in C++ to use OOP?


a) iostream.h
b) stdio.h
c) stdlib.h
d) OOP can be used without using any header file

Answer: d
Explanation: We need not include any specific header file to use OOP concept in C++, only specific
functions used in code need their respective header files to be included or classes should be defined if
Page 3 of 19
needed.

13. Which of the two features match each other?


a) Inheritance and Encapsulation
b) Encapsulation and Polymorphism
c) Encapsulation and Abstraction
d) Abstraction and Polymorphism

Answer: c
Explanation: Encapsulation and Abstraction are similar features. Encapsulation is actually binding all the
properties in a single class or we can say hiding all the features of object inside a class. And Abstraction is
hiding unwanted data (for user) and showing only the data required by the user of program.

14.Which of the following cannot be friend?


a) Function
b) Class
c) Object
d) Operator function

15. Which of the following concepts of OOPS means exposing only necessary information to client?
a) Encapsulation
b) Abstraction
c) Data hiding
d) Data binding
16. cout is a/an __________ .
a) operator
b) function
c) object
d) macro

17.Which of the following is an abstract data type?


a) int
b) double
c) string
d) Class

18.Which of the following approach is adapted by C++?


a) Top-down
b) Bottom-up
c) Right-left
d) Left-right
19.Which of the following concepts means wrapping up of data and functions together?
a) Abstraction
b) Encapsulation
c) Inheritance
d) Polymorphism

20.Which of the following operator is overloaded for object cout?


a) >>
b) <<
Page 4 of 19
c) +
d) =

21 .Which of the following is the correct class of the object cout?


a) iostream
b) istream
c) ostream
d) ifstream

22.Which of the following statement is correct?


a) C++ allows static type checking.
b) C++ allows dynamic type checking.
c) C++ allows static member function be of type const.
d) Both A and B.

23. What's wrong? for (int k = 2, k <=12, k++)


a. the increment should always be ++k
b. the variable must always be the letter i when using a for loop
c. there should be a semicolon at the end of the statement
d. the commas should be semicolons

24What does STL stand for?


a) Simple Template Library
b) Standard Template Library
c) Static Type Library
d) Single Type-based Library

25.Each pass through a loop is called a/an


a) enumeration
b) iteration
c) culmination
d) pass through

26.If a member needs to have unique value for all the objects of that same class, d eclare the
member as
a) Global variable outside class
b) Local variable inside constructor
c) Static variable inside class
d) Dynamic variable inside class

27.Which looping process checks the test condition at the end of the loop?
a. for
b. while
c. do-while
d. no looping process checks the test condition at the

28. The output of this program is

int
Page 5 of 19
main () { cout << "Hello World!" return 0; }

a) Hello World
b) Syntax error
c) 0

29. Hello World! What is the size of int data type?


a) 2 bytes
b) 4 bytes
c) 8 bytes
d) 10 bytes

30. What is an array of objects?


a) An array of instances of class represented by single name
b) An array of instances of class represented by more than one name
c) An array of instances which have more than 2 instances
d) An array of instances which have different types

3 1.What is tokens------
a) Smallest unit of program
b) Object
c) program
None of above

32.. Different types of decision making statement……..


a) IF
b) IF else
c) Nested if else
All of above

33. What is the size of int data type?


a) 2 bytes
b) 4 bytes
c) 8 bytes
10 bytes

34.The preprocessor directive always ends with …

a) A comma

b) A semicolon

c) Neither a semicolon nor a comma

d) "/"

02 – Classes and Objects Marks:-18

Page 6 of 19
Content of Chapter:-
2.1 Class & Object: Introduction, specifying a class ,access specifiers, defining member functions, creating
Objects, memory allocations for objects.
2.2 Static data members, static member function, friend Function
2.3 Array of Objects, Object as function arguments.
2.4 Concepts of Constructors, Types of constructors.
2.5 Multiple Constructors in a Class, Constructors with default arguments.
2.6 Destructors.

1. Which of the following is not type of class?


a) Abstract Class
b) Final Class
c) Start Class
d) String Class

Answer: c
Explanation: Only 9 types of classes are provided in general, namely, abstract, final, mutable, wrapper, anonymous,
input-output, string, system, network. We may further divide the classes into parent class and subclass if inheritance
is used.
2. Class is pass by
a) Value
b) Reference
c) Value or Reference, depending on program
d) Copy

Answer: b
Explanation: Classes are pass by reference, and the structures are pass by copy. It doesn’t depend on the program.

3. What is default access specifier for data members or member functions declared within a class without any
specifier, in C++?
a) Private
b) Protcted
c) Public
d) Depends on compiler

Answer: a
Explanation: The data members and member functions are Private by default in C++ classes, if none of the access
specifier is used. It is actually made to increase the privacy of data.

4. Which is most appropriate comment on following class definition?


class Student
{
int a;
public : float a;
}
a) Error : same variable name can’t be used twice
b) Error : Public must come first
c) Error : data types are different for same variable
d) It is correct

Answer: a
Explanation: Same variable can’t be defined twice in same scope. Even if the data types are different, variable name
must be different. There is no rule like Public member should come first or last.
Page 7 of 19
5. Which is known as a generic class?
a) Abstract class
b) Final class
c) Template class
d) Efficient Code

Answer: c
Explanation: Template classes are known to be generic classes because those can be used for any data type value
and the same class can be used for all the variables of different data types.

6. Size of a class is
a) Sum of the size of all the variables declared inside the class
b) Sum of the size of all the variables along with inherited variables in the class
c) Size of the largest size of variable
d) Classes doesn’t have any size

Answer: d
Explanation: Classes doesn’t have any size, actually the size of object of the class can be defined. That is done only
when an object is created and its constructor is called.

7. Which of the following describes a friend class?


a) Friend class can access all the private members of the class, of which it is a friend
b) Friend class can only access protected members of the class, of which it is a friend
c) Friend class don’t have any implementation
d) Friend class can’t access any data member of another class but can use it’s methods

Answer: a
Explanation: A friend class can access all the private members of another class, of which it is a friend. It is a special
class provided to use when you need to reuse the data of a class but don’t want that class to have those special
functions.

8. What is the scope of a class nested inside another class?


a) Protected scope
b) Private scope
c) Global scope
d) Depends on access specifier and inheritance used

Answer: d
Explanation: It depends on the access specifier and the type of inheritance used with the class, because if the class
is inherited then the nested class can be used by subclass too, provided it’s not of private type.

9. Class with main() function can be inherited.


a) True
b) False

Answer: a
Explanation: The class containing main function can be inherited and hence the program can be executed using the
derived class names also in java.

10. Which among the following is false, for a member function of a class?
a) All member functions must be defined
b) Member functions can be defined inside or outside the class body

Page 8 of 19
c) Member functions need not be declared inside the class definition
d) Member functions can be made friend to another class using the friend keyword
Answer: c
Explanation: Member functions must be declared inside class body, though the definition can be given outside the
class body. There is no way to declare the member functions outside the class.

11. Which syntax for class definition is wrong?


a) class student{ };
b) student class{ };
c) class student{ public: student(int a){ } };
d) class student{ student(int a){} };

Answer: b
Explanation: Keyword class should come first. Class name should come after keyword class. Parameterized
constructor definition depends on programmer so it can be left empty also.

12. Which of the following pairs are similar?


a) Class and object
b) Class and structure
c) Structure and object
d) Structure and functions

Answer: b
Explanation: Class and structure are similar to each other. Only major difference is that a structure doesn’t have
member functions whereas the class can have both data members and member functions.

13. Which among the following is false for class features?


a) Classes may/may not have both data members and member functions
b) Class definition must be ended with a colon
c) Class can have only member functions with no data members
d) Class is similar to union and structures

Answer: b
Explanation: Class definition must end with a semicolon, not colon. Class can have only member functions in its body
with no data members.

14. Instance of which type of class can’t be created?


a) Anonymous class
b) Nested class
c) Parent class
d) Abstract class

Answer: d
Explanation: Instance of abstract class can’t be created as it will not have any constructor of its own, hence while
creating an instance of class, it can’t initialize the object members. Actually the class inheriting the abstract class can
have its instance because it will have implementation of all members.

15. Which definition best describes an object?


a) Instance of a class
b) Instance of itself
c) Child of a class
d) Overview of a class

Page 9 of 19
Answer: a
Explanation: An object is instance of its class. It can be declared in the same way that a variable is declared, only
thing is you have to use class name as the data type.

16. How many objects can be declared of a specific class in a single program?
a) 32768
b) 127
c) 1
d) As many as you want

Answer: d
Explanation: You can create as many objects of a specific class as you want, provided enough memory is available.

17. Which among the following is false?


a) Object must be created before using members of a class
b) Memory for an object is allocated only after its constructor is called
c) Objects can’t be passed by reference
d) Objects size depends on its class data members

Answer: c
Explanation: Objects can be passed by reference. Objects can be passed by value also. If the object of a class is not
created, we can’t use members of that class.

18. Which of the following is incorrect?


a) class student{ }s;
b) class student{ }; student s;
c) class student{ }s[];
d) class student{ }; student s[5];

Answer: c
Explanation: The array must be specified with a size. You can’t declare object array, or any other linear array without
specifying its size. It’s a mandatory field.

19. The object can’t be


a) Passed by reference
b) Passed by value
c) Passed by copy
d) Passed as function

Answer: d
Explanation: Object can’t be passed as function as it is an instance of some class, it’s not a function. Object can be
passed by reference, value or copy. There is no term defined as pass as function for objects.

20. What is size of the object of following class (64 bit system)?

class student int char name[20]; static int


{
a) 20
b) 22
c) 24
d) 28

Answer: c
Page 10 of 19
Explanation: The size of any object of student class will be of size 4+20=24, because static members are not really
considered as property of a single object. So static variables size will not be added.

21. Functions can’t return objects.


a) True
b) False

Answer: b
Explanation: Functions can always return an object if the return type is same as that of object being returned. Care
has to be taken while writing the prototype of the function.

22. How members of an object are accessed?


a) Using dot operator/period symbol
b) Using scope resolution operator
c) Using member names directly
d) Using pointer only

Answer: a
Explanation: Using dot operator after the name of object we can access its members. It is not necessary to use the
pointers. We can’t use the names directly because it may be used outside the class.

23. If a local class is defined in a function, which of the following is true for an object of that class?
a) Object is accessible outside the function
b) Object can be declared inside any other function
c) Object can be used to call other class members
d) Object can be used/accessed/declared locally in that function

Answer: d
Explanation: For an object which belongs to a local class, it is mandatory to declare and use the object within the
function because the class is accessible locally within the class only.

24. Which among the following is wrong?


a) class student{ }; student s;
b) abstract class student{ }; student s;
c) abstract class student{ }s[50000000];
d) abstract class student{ }; class toppers: public student{ }; topper t;

Answer: b
Explanation: We can never create instance of an abstract class. Abstract classes doesn’t have constructors and
hence when an instance is created there is no facility to initialize its members. Option d is correct because topper
class is inheriting the base abstract class student, and hence topper class object can be created easily.

25. Object declared in main() function


a) Can be used by any other function
b) Can be used by main() function of any other program
c) Can’t be used by any other function
d) Can be accessed using scope resolution operator

Answer: c
Explanation: The object declared in main() have local scope inside main() function only. It can’t be used outside
main() function. Scope resolution operator is used to access globally declared variables/objects.

26. When an object is returned


a) A temporary object is created to return the value
Page 11 of 19
b) The same object used in function is used to return the value
c) The Object can be returned without creation of temporary object
d) Object are returned implicitly, we can’t say how it happens inside program

Answer: a
Explanation: A temporary object is created to return the value. It is created because the object used in function is
destroyed as soon as the function is returned. The temporary variable returns the value and then gets destroyed.

27. Which among the following is correct?


a) class student{ }s1,s2; s1.student()=s2.student();
b) class student{ }s1; class topper{ }t1; s1=t1;
c) class student{ }s1,s2; s1=s2;
d) class student{ }s1; class topper{ }t1; s1.student()=s2.topper();

Answer: c
Explanation: Only if the objects are of same class then their data can be copied from to another using assignment
operator. This actually comes under operator overloading. Class constructors can’t be assigned any explicit value as
in option class student{ }s1; class topper{ }t1; s1=t1; and class student{ }s1; class topper{ }t1;
s1.student()=s2.topper();.

28. Which among following is correct for initializing the class below?
class student{ int marks; int cgpa;
public: student(int i, intj)
{
marks=I;
cgpa=j

}
};

a) student s[3]={ s(394, 9); s(394, 9); s(394,9); };


b) student s[2]={ s(394,9), s(222,5) };
c) student s[2]={ s1(392,9), s2(222,5) };
d) student s[2]={ s[392,9], s2[222,5] };

Answer: b
Explanation: It is the way we can initialize the data members for an object array using parameterized constructor. We
can do this to pass our own intended values to initialize the object array data.

29. Object can’t be used with pointers because they belong to user defined class, and compiler can’t decide the
type of data may be used inside the class.
a) True
b) False

Answer: b
Explanation: The explanation given is wrong because object can always be used with pointers like with any other
variables. Compiler doesn’t have to know the structure of the class to use a pointer because the pointers only points
to a memory address/stores that address.

30. Which of the following term is used for a function defined inside a class?

a) Member Variable
b) Member function
c) Class function
Page 12 of 19
d) Classic functio

32.Which of the following statements regarding inline functions is correct?

a) A.It speeds up execution.


b) B.It slows down execution.
c) C.It increases the code size.
d) D.Both A and C

33.How many types of access specifiers are provided in OOP (C++)?


a) 1
b) 2
c) 3
d) 4
34.. Which among the following can be used together in a single class?
a) Only private
b) Private and Protected together
c) Private and Public together
d) All three together
35.. Which among the following can restrict class members to get inherited?
a) Private
b) Protected
c) Public
d) All three
36..Which access specifier is used when no access specifier is used with a member of class ?
a) Private
b) Default
c) Protected
d) Public
37. Which among the following is false?
a) Private members can be accessed using friend functions
b) Member functions can be made private
c) Default members can’t be inherited
d) Public members are accessible from other classes also
38. If a class has all the private members, which specifier will be used for its implicit constructor?
a) Private
b) Public
c) Protected
d) Default
39.If class A has add() function with protected access, and few other members in public. Then class B inherits
class A privately. Will the user will not be able to call _________ from the object of class B.
a) Any function of class A
b) The add() function of class A
c) Any member of class A
d) Private, protected and public members of class A

40. A constructor that accepts parameters is called the default constructor.

Page 13 of 19
a. One
b. Two
c. Three
d. No
41. What happens when a class with parameterized constructors and having no default constructor
is used in a program and we create an object that needs a zero- argument constructor?
a. Compile-time error.
b. Preprocessing error.
c. Runtime error.
d. Runtime exception.
42. Can a class have virtual destructor?
a. Yes
b. No
c. May be
d. None of above
43. Destructor has the same name as the constructor and it is preceded by
a. !
b. ?
c. ~
d. $
44. For automatic objects, constructors and destructors are called each time the objects
a. enter and leave scope
b. inherit parent class
c. are constructed
d. are destroyed
45. Which constructor function is designed to copy objects of the same class type?
a. Create constructor
b. Object constructor
c. Dynamic constructor
d. Copy constructor
46. Which of the following statement is correct?
a. Constructor has the same name as that of the class.
b. Destructor has the same name as that of the class with a tilde symbol at the beginning.
c. Both A and B.
d. Destructor has the same name as the first member function of the class.
47. Which of the following statement is incorrect?
a. Constructor is a member function of the class.
b. The compiler always provides a zero argument constructor.
c. It is necessary that a constructor in a class should always be public.
d. Both B and C.
48. When are the Global objects destroyed?
a. When the control comes out of the block in which they are being used.
b. When the program terminates.
c. When the control comes out of the function in which they are being used.
d. As soon as local objects die.
49. Copy constructor must receive its arguments by .
a. either pass-by-value or pass-by-reference
b. only pass-by-value
c. only pass-by-reference
Page 14 of 19
d. only pass by address
50. A function with the same name as the class, but proceeded with a tilde character (~) is called
of that class.
a. Constructor
b. Destructor
c. Function
d. Object
51. A union that has no constructor can be initialized with another union of type.
a. different
b. same
c. virtual
d. class
52. Which of the following gets called when an object goes out of scope?
a.Constructor
b.Destructor
c.Main
d.virtual function
52. Which of the following statement is correct?
a) Destructor destroys only integer data members of the object.
b) Destructor destroys only float data members of the object.
c) Destructor destroys only pointer data members of the object.
d) Destructor destroys the complete object.
53. ___ used to make a copy of one class object from another class object of the same class type.
a) Constructor
b) Copy constructor
c) Destructor
d) Default constructor
54.Constructor to allow different approaches of object construction.
a) cannot overloaded
b) can be overloaded
c) can be called
d) can be nested
55 .Which of the following statement is correct?
a) A destructor has the same name as the class in which it is present.
b) A destructor has a different name than the class in which it is present.
c) A destructor always returns an integer.
d) A destructor can be overloaded.
56. Which of the following cannot be declared as virtual?
a) Constructor
b) Destructor
c) Data Members
d) Both A and C
57. .If the copy constructor receives its arguments by value, the copy constructor would
a) call one-argument constructor of the class
b) work without any problem
c) call itself recursively
d) call zero-argument constructor
58. Which of the following are NOT provided by the compiler by default?
a. Zero-argument Constructor
Page 15 of 19
b. Destructor
c. Copy Constructor
d. Copy Destructor
59. Which rule will not affect the friend function?
a) private and protected members of a class cannot be accessed from outside
b) private and protected member can be accessed anywhere
c) protected member can be accessed anywhere
d) private member can be accessed anywhere

60.Which keyword is used to declare the friend function?


a) firend
b) friend
c) classfriend
d) myfriend
61.What is the syntax of friend function?
a) friend class1 Class2;
b) friend class;
c) friend class
d) friend class()
62. Pick out the correct statement.
a) A friend function may be a member of another class
b) A friend function may not be a member of another class
c) A friend function may or may not be a member of another class
d) None of the mentioned
63. Where does keyword ‘friend’ should be placed?
a) function declaration
b) function definition
c) main function
d) block function
64. Which of the following cannot be used with the keyword virtual?
a. class
b. member functions
c. constructor
d. destructor
65. Which specifier applies only to the constructors?
a) Public
b) Protected
c) Implicit
d) Explicit
66. Which of the following is not a type of constructor? Which of t
a) Copy constructor
b) Friend constructor
c) Default constructor
d) Parameterized constructor

Page 16 of 19
03 – Extending classes using Inheritance Marks:-16
Content of Chapter:-
3.1 Introduction, defining a derived class, visibility modes & effects.
3.2 Types of Inheritance : Single inheritance, multilevel inheritance, hierarchical inheritance, hybrid
inheritance
3.3 Virtual base class, abstract class, constructors in derived class.

1. If class B inherits class A privately. And class B has a friend function. Will the friend function be able to access
the private member of class A?
a) Yes, because friend function can access all the members
b) Yes, because friend function is of class B
c) No, because friend function can only access private members of friend class
d) No, because friend function can access private member of class A also
2. When the inheritance is private, the private methods in base class are __________ in the derived class (in
C++).
A.Inaccessible
B. Accessible
C. Protected
D. Public
3 .Which design patterns benefit from the multiple inheritances?
A. Adapter and observer pattern
B. Code pattern
C. Glue pattern
D. None of the mentioned

4 What is meant by multiple inheritance?


A. Deriving a base class from derived class
B. Deriving a derived class from base class
C. Deriving a derived class from more than one base class
D. None of the mentioned
5. What will be the order of execution of base class constructors in the following method of inheritance.class a:
public b, public c {...};
A. b(); c(); a();
B. c(); b(); a();
C. a(); b(); c();
D. b(); a(); c();

6. Inheritance allow in C++ Program?


A. Class Re-usability
B. Creating a hierarchy of classes
C. Extendibility
D. All of the above

7. Can we pass parameters to base class constructor though derived class or derived class constructor?
A. Yes
B. No
C. May Be
D. Can't Say

8 What are the things are inherited from the base class?

Page 17 of 19
A. Constructor and its destructor
B. Operator=() members
C. Friends
D. All of the above

9. Which of the following advantages we lose by using multiple inheritance?


A. Dynamic binding
B. Polymorphism
C. Both Dynamic binding & Polymorphism
D. None of the mentioned

10. Which symbol is used to create multiple inheritance?


A. Dot
B. Comma
C. Dollar
D. None of the above

11. If there are 5 classes, E is derived from D, D from C, C from B and B from A. Which class constructor
will be called first if the object of E or D is created?
a) A
b) B
c) C
d) A and B

12.There are different types of inheritance__________


a) Single level
b) multiple
c) multilevel
d)All

13.Which class can have member functions without their implementation?


a) Default class
b) String class
c) Template class
d) Abstract class

Answer: d
Explanation: Abstract classes can have member functions with no implementation, where the inheriting subclasses
must implement those functions.

.14.Which of the following concepts provides facility of using object of one class inside another class?
a) Encapsulation
b) Abstraction
c) Composition
d) Inheritance

Page 18 of 19
Verified By Re-Verified By Approved By
Prepared By
Ms.Pawar J.S.
Module Coordinator Academic Coordinator HoD CE

Guidelines
1. Submit single file for each subject that contain all chapters
in sequence in given format.
2. Count of MCQ’s should not be less than 40 questions per
chapter. (For low weightage chapters it will be less but
keep in mind total MCQ’s for subject should not be less
than 200)
3. Quality of questions will be verified by module
coordinators, Re-verified by MCQ coordinator and
approved by head of department.
4. Use standard Name formats for PDF file to be submitted eg.
EE5I_ECI_22324

Deadlines for Task

Date Activity
Departmental Coordinator verifies and collect final subject wise PDF and mail pending subject
list to head of department.
Departmental coordinator submit list of pending and completed subject list institute level
coordinator
Distribution of collected subject wise PDF to respective classes and show cause notice to
faculties who have pending MCQ’s Preparation/Distribution task

Page 19 of 19

You might also like