OOP IMP Questions And Topics
OOP IMP Questions And Topics
OOP IMP Questions And Topics
(2019-winter,2019-summer, 2022-summer,2023-summer,2023-winter)
❖ Key Topics:-
3. Polymorphism
o Compile time vs run – time polymorphism.
o Operator overloading.
o Function overloading
Page | 1
o Types of Inheritance(single , multiple , multilevel , hybrid).
o Visibility modes (public , private , protected)
o Programs involving inheritance hierarchy
Page | 2
3. Theory and Conceptual Questions
o Characterstics and rules of virtual functions
o Use and syntax of scope resolution operator
o Type casting and its use in c++
1. State the difference between OOP and POP. (winter 2019 – 2 marks) Q1.a
2. Differentiate between C and C++. (winter 2023 - 2 marks)Q1.a
3. Differentiate between compile time and run time polymorphism.(summer 2022 – 4 marks)Q3.d
Page | 3
1. What is a class? Give its example.(winter 2019 – 2 marks) Q1.b
2. What is a class? Give its example.(summer 2019 – 2 marks) Q1.d
3. Give the syntax of class.(winter 2023 – 2 marks)Q1.b
4. Write the syntax for declaration of a class.(summer 2023 – 2 marks)Q1.b
5. Give syntax and use of fclose ( ) function(winter 2019 – 2 marks)Q1.g
6. Give the syntax and use of fclose( ) function.(winter 2023 – 2 marks)Q1.d
1. What is multilevel inheritance? Draw the diagram to show multilevel inheritance. using classes with data member and member
function.(winter 2019 – 2 marks)Q1.c
2. Explain multilevel inheritance with an example.(winter 2023 – 4 marks)Q3.b
3. Describe structure of C++ program with diagram.(summer 2019 – 3 marks)Q6.a-i]
Page | 4
➢ Virtual Base Class IMP:-
Page | 5
1. Describe ‘this’ pointer with an example(winter 2019 & 2023 – 4 & 6 marks)Q2.d & Q5.b
2. Define polymorphism with it’s types.(summer 2023 – 2 marks)Q1.f
3. Illustrate this pointer with example.(summer 2023 – 4 marks)Q2.d
4. Write C++ program to overload binary operator ‘+’ to concatenate two strings.(summer 2023 – 6 marks)Q6.c
5. Write a C++ program to overload add function to add two integer numbers and two float numbers.(summer 2022 – 4 marks)Q4.b
6. Define pointer operator and address operator with example.(summer 2022 – 3 marks)Q5.a-i]
7. Write a C++ program to overload “+” operator so that it will perform concatenation of two strings. (Use class get data function to
accept two strings)(summer 2022 – 6 marks)Q6.b
8. Write any three rules of operator overloading(summer 2019 – 3 marks)Q5.a-i]
9. Write a program in C++ to overload unary ‘_’ operator to negate values of data members of class. (summer 2019 – 3 marks)Q5.b-ii]
10. Write a program to overload the ‘—’ unary operator to negate the values.(winter 2019 – 6 marks)Q6.c
➢ Inheritance IMP:-
Page | 6
1. Write a program to implement single inheritance from the following Refer Figure No. 1.(winter 2019 – 4 marks)Q2.b
2. Write a program to implement multiple inheritance as shown in following Figure No. 1:(summer 2019 – 4 marks)Q4.a
Page | 7
3. Write a C++ program to implement following in inheritance. Refer Figure No. 2.(summer 2019 – 6 marks)Q6.c
4. Write a program to implement inheritance as shown in figure No. 2. Assume suitable member function (summer2022 – 6
marks)Q6.c
Page | 8
5. Describe following terms: Inheritance, data abstraction, data encapsulation, dynamic binding.(summer 2019 – 4 marks)Q4.b
6. Write a program to implement the following hierarchy using suitable member functions. Refer Figure No. 2.(winter 2019 – 6
marks)Q6.b
8. State and describe visibility modes and its effects used in inheritance(summer winter 2019 – 4 marks)
Page | 9
➢ Functions:-
➢ File Operations:-
1. Write a program that copies contents of one file into another file.(winter 2019 – 6 marks)Q6.a
2. Write a C++ program to count number of spaces in text file(summer 2019 – 4 marks)Q4.d
3. Write a C++ program to append data from abc . txt to xyz . txt file.(summer 2019 – 6 marks)Q5.b
4. Write a C++ program for write into a file using file operations.(winter 2023 – 4 marks)Q3.d
5. Write a program for closing a file.(summer 2023 – 4 marks)Q4.e
6. Explain ios :: app and ios :: in flags(summer 2022 – 2 marks)Q1.e
7. Write the use of ios : : in and ios : : out.(summer 2019 – 2 marks)Q1.e
➢ Array Of Object:-
Page | 10
1. Write a program to declare a class ‘student’ having data members as ‘stud_name’ and ‘roll_no’. Accept and display this data for 5
students.(winter 2019 – 6 marks)Q5.a
2. Write a C++ program to declare a class student with members as roll no, name and department. Declare a parameterised
constructor with default value for department as ‘CO’ to initialize members of object. Initialize and display data for two
students.(summer 2019 – 6 marks)Q5.c
3. Write a C++ program to define structure student having data members name, roll no., age. Accept and display data for one
student.(winter 2023 – 4 marks)Q3.c
4. Write a program to declare a class ‘employee’ containing data members ‘emp-id’ and ‘salary’. Accept and display this data for 10
employees.(winter 2023 – 6 marks)Q5.c
Page | 11