OOPS PYQ
OOPS PYQ
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)
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
Page2 of2
& Date
aturday
o5/2018
Semester
IV
Subject Name
(Fresh) Object Oriented Time Code Marks
INSTH
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
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.
I1=F1;
I2=F2;
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
student and read data from file and display on output screen.
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)
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.
b)Explain use of the friend function with the help of a suitable example.
7M
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
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.
b)What are constructors and destructors ?How they differ from normal
functions? 7M
Q
3)Answer the following:
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