0% found this document useful (0 votes)
38 views

OOPS PYQ

The document contains a series of examination questions related to Object Oriented Programming (OOP) for various semesters and subjects. It includes instructions for answering questions, such as attempting compulsory questions and providing examples for concepts like inheritance, polymorphism, exception handling, and operator overloading. The questions are designed to assess understanding of OOP principles, C++ programming, and related topics.

Uploaded by

rudralad2005
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)
38 views

OOPS PYQ

The document contains a series of examination questions related to Object Oriented Programming (OOP) for various semesters and subjects. It includes instructions for answering questions, such as attempting compulsory questions and providing examples for concepts like inheritance, polymorphism, exception handling, and operator overloading. The questions are designed to assess understanding of OOP principles, C++ programming, and related topics.

Uploaded by

rudralad2005
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/ 11

&Date Semester

hursday IV Subject Name Time


5I2019 (Fresh) Object Oriented 10.30 AM
Code Marks

Programming (CSTIIT) To
01.00 PM
4163
TUTE
75

kruction:
) Question 1is Compulsory. G
) Attempt any four from
remaining.
Attempt any three
a) Write asyntax of user defined (15)
5) What is copy constructor? manipulators
Explain copy
and explain it with example.
c) How reference variables are created. constructor with example.
int &n=10;
Check whether the above
a Explain the concept of statement is correct or not.Give proper reason.
P) What is this pointer ? hierarchical inheritance.
Write a program to demonstrate this pointer.
h2 a) Design classes using Class Template such
statements:
that they supports the following (8)
Rupees R1, R2;
Dollar D1, D2;
D1 = Rl; //converts rupees into dollars
R2 = D2: /converts dollar into rupees

b) How constructors are invoked in Base and Derived classes in multiple (7)
Inheritance

3 a) What is friend function? Explain with example how friend function is (8)
bridge between two classes.
b) Explain important features of objectoriented programming. (7)

4 a) What is void pointer ? Write a program to demonstrate void pointer. (8)


(7)
b) Explain different file opening modes in C++,
inheritance to find the area and (8)
o a) Write aprogram to implement multiple
perimeter of the circle and total cost to paint the circle.
in C++ with example. (7)
0) Explain different memory management operators

Page 1 of2
Subject Name Time
Day & Date
Semester
Object Oriented 10.30 AM Code Ma
IV To
Thursday
23/05/2019 (Fresh)
Programming (CST/IT) 01.00 PM 4163

class Name. Create three namal


Q6 a) Write a program using nameless objects tor
objects with following details, argument.
1) Ist nameless object will take First Name as
2)lUndnameless object willtake First Name and middle name as argunments.
3) IIrd nameless object willtake Frst Name, middle name and last name as
arguments.
b)Explain different exception handling mechanism in C++.

Q7 a) Design aclass Meter with


(7)
Meter meter1, meter2; (8)
which implements statements
meter1=length1; l/ where int lengthl , convert length to meter
length2=meter2; /where int length2, convert meter to length
b) What is template ? Write aprogram to
demonstrate function template. 0)

Page2 of2
& Date
aturday
o5/2018
Semester
IV
Subject Name
(Fresh) Object Oriented Time Code Marks
INSTH

sructions: Programming (CSTIT) 11.00 AM


To
01.30 PM
SH
416 75
(CHNO
)
figure to the right SADT WUM
II) indicate full marks.
Question
no 1is
compulsory.
III)Attempt any
four of remaining
questions.
h1) Answer the
Following: 15M
A)
Difference between object oriented oriented
programming. programming and procedure
B) Explain how Dynamic
Binding is achieved in C++
C) Explain the hierarchy of stream classes for
console VOoperations.
D) What are difference between pointers to constant and constant pointer. BXplain
with proper example.
E) Differentiate constructor and destructor.

Q2) Answer the Following:


7M
A) Explain function overloading with suitable example.
function and inline function. Explain with
B) What is difference between normal 8M
example.

Page1 of2
Day & Date Semester Subject Name Time
Saturday IV Object Oriented 11.00 AM Code
19/05/2018 (Fresh) Programming (CSTIIT) To
01.30 PM 4163 Marks
75
Q3) Answer the Following:
A) Explain newand delete operator with suitable example.
B) Define class having data member int a and float b with 7M
default,
Copy constructor. Write a program for the same.
parameterized and
8M
Q 4) Answer the Following:
A) Define virtual function. What is the need of virtual
function.
how pointer of base class is used for derived class to
execute
Explain with
B) Explain class template and function template. function. exampl
7M e
8M
Q5) Answer the Following:
A) How to open file with
constructor, explain with example.
B) Explain try,catch and throw 7M
block with example.
8M
Q6) Answer the
Following:
A) Explain parameter
passing by reference in c++ with
B) Write apowerO to exámple. 7M
raise
of x and int value for y
a number x to
power y. The function takes a
Use default value 2 for y double value
& returns the
square when this argument is result.
x & y from the user omited. Write a main) function that to calculate
and show the result. gets the value of
8M

Q7) Answer the


Following:
A) Write aC++
program to
operator overloading. perform addition cf two Complex numbers using
8) State 7M
important fcatures of Object Oriented
Programming 8M

Page 2 of 2
pate Semester
sday V Subject Name Time Code
2018
(Repeater) Object Oriented 10.30 AM Marks
Programming (CSTIT) To
01.00 PM
4163 75
ction:
D figure to the
right indicate full marks.
II) Question no 1 is
compulsory.
III) Attempt any four of
remaining questions.

)Explain following (Any 3)


1S M
1. Abstraction 2. Inheritance 3.
Polymorphism 4. Message binding 5.
Encapsulation
Answer the Following:
1. Explain with suitable example how two
classes can be bridged using concept of friend. 7M
). Design Two classes Feet and Inches such that they
support following statements. 8M
Feet f1,f2;
Inches I1, I2;

I1=F1;
I2=F2;

) Answer the Following:


I. What is type conversion? write a program to convert hours to minutes using type conversion. 7M

2. Write a program to overload binary + operator for string cdass. 8M

Page 1 of 2
Day & Date Semester Subject Name Time
IV
Object Oriented 10.30 AM Code
Tuesday Programming(CST/IT) To
13/11/2018| (Repeater) 01.00 PM 4163

Q 4) Answer the Following:

Write a program to implement single inheritance for Employee and


1.
should include name, e_id and
Department witlh public
specifies. Employee class Department class
should have
cal_salary0.
2. IHow polymorphism is achieved at compile time and run time , explain with
write a program for run time polymorphism. example.
QS) Answer the Following:

I. Define exception. Explain exception handling mechanism in c++,


2. Write a program in c++ to create file student.txt. writedata like name, rolln0, marbe:e.

student and read data from file and display on output screen.

Q6) Answer the Following:


I. Explain all access specifiers in c+tt.
2. List ail the types of constructors.- Explain in
detail about parameterized-constructor

Q) Answer the Following:


(
1. Write a program for following type of
inheritance. 7M
Person

Student
Spots

Result
2. Write a program to
count number of lines, spaces and tabs in 8M
file.

P
BACHELOR OF TECHNOLOGY(CST/IT/CE/DS)

Day & Date Semester Subject Name Tlme


ECHNOL
Max.Mark

8M 03/05/2023 Object Orlented Programming


(CST/T/Ds/CE)
11.00 TO 1.30 PM 543413

Instructions:
15M D figure to the right indicate full marks.
I) Question no 1 is compulsory.
III) Attempt any four from Q.2 to Q7.

Q 1)Answer the Following:(Any 5) 15M

a)State any five points to differentiate between function overloading and


function overriding.
b)Explain the properties of the constructor function.
c)Explain default argument functions in C++ using a suitable example..
d)What is generic programming? Explain its features.
f)Explain about exception handling in Ct+.
g)Why is it necessary to overload operators?
Q2)Answer the following:

a)What is object-oriented programming?How is it different from


procedure-oriented programming ? 8M

b)Explain use of the friend function with the help of a suitable example.
7M

Q3)Answer the following:

a) Write a C++ program to add to complex numbers using t operator


overloading and also use this pointer. 8M

b)Create a class time and overland the increment (++) operator that
operates in both prefix and postfix notation and display the calculated
time. 7M
Q4)Answer the following:
a) What is meant by dynamic or late binding? How is it implemented in C++2
Distinguish between late binding and early binding. 8M

b)How constructor are invoked in Base and Derived classes in multiple


inheritance.Explain with example. 7M

Q 5)Answer the following:

a) Give syntax of and explain various functions related to ifstream and


ofstream classes: seekp(), getline),hide(),tail) . 8M

b)Describe different methods of opening a file. WAP in CHt to open a file


named"BIO.txt" and write your nane and other details into that file. 7M
Q
6)Answer the following:
a)Explain diferent features & benefits of object oriented
language. programming
8M
b)Explain Copy Constructor. Elaborate with suitable
example? 7M

Q
T)write a note(Any 3)
15M
a. new and delete
operator
b. Inline function

c. Virtual functions

d. Manipulators in C+
e. Access
specifiers in C++t
f. void pointer
EOF TEOI,
BACHELOR OF TECHNOLOGY(CSTIT/CE DSY
8?
Day & Semester Subject Name TÉmeSode Max
Time NSUNIyenarKs
loliz la2 Object Oriented Programming 2 . 6434 13|75
(CST/IT/CEDS) 30 min
Instructions:
I) figure to the right indicate full marks.
I) Question no 1is compulsory.
III) Attempt any four from Q.2 to Q7.

Q1)Answer the following: (Any 5) 15M

a) What is meant by paradigm? What are various programming paradigms


you are familiar with?
b)State rules of operator overloading.list the operators that can not be
overloaded and justify why they can not be overloaded?
c)Explain the concept of abstract class
d)Define File pointer
DDistinguish between Objects and classes.
g)State use of a new operator.

Q2)Answer the following:

a)Explain the concept of pass by address and pass by reference. 8M

b)What are constructors and destructors ?How they differ from normal
functions? 7M

Q
3)Answer the following:

a) Writea Ctt program to display the number of objects created using


staticdata member and static member function 8M

b) Writea C+t program to swap two numbersusing pointer TM


Bachelor of Technology (NEP) Nov-Dec -2024
Max
Day & Date Semester Subject Name Time Code Marks

Wednesday II (Fresh) Object Oriented 02.30 p.m.to


30540101
04/12/2024 Programming(CST/IT/CE/AI) 04.30 p.m.
50

Instructions:
1. Question no. 1 is Compulsory
2. Solve any four from Question no. 2. to Question no. 7
3. Figures to the right indicate full marks
Q.1 Attempt any five: 10m
Distinguish between procedure oriented programming and object .
oriented programming?
Explain the concept of Constructors with its types.
Illustrate the use of default argument with example?
What is void pointer?
State the difference between Function Overloading and function
Overriding?
Define class template and function template in generic programming?
Why new and delete operators are used in C++?
5m
Q2a Write a program to take input of faculty details (id, name, post,
qualification , address)and display it.
5m
by Explain static data member and member function with the help of
suitable example.
Write a program to display area of rectangle using constructors and 5m
destroy the data using destructor 5m
Write a program to take input of employee details private data members
_alary and public data members as id, name, post and display it
Q.4 Y Write a program to implement single inheritance for Employee and 5m
department with public access. Employee class should include name, id
and department. Class should have calsalary() function.
5m
What is operator overloading? Design a program to show how unary
minus operator is overloaded.

Q.5 a) Discuss the concept of exception handling and different types of exception 5m
handling constructs.
Draw and Explain hierarchy of iostream? 5m
b)
Q.6 a) Consider class network of fig.1 The class master derives information 5m
from both account and admin classes which in turn derive information
from the class person. Define all four classes and write a program to
create and display the information contained in master objects.
person
Name
COde

admin
Account experience
Pay

master
name
code
experience
pay
b) DIscuss class template with sultable example. Sm
Q.7 Write a note (5 marks each) ANY 2 Sm
Public, private and protected speciflers in C++
b' Early binding and late binding Sm
c) Basic concepts of 0OP Sm
Virtual base class Sm

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy