Summer 2017 Question Paper
Summer 2017 Question Paper
Summer 2017 Question Paper
16172
3 Hours / 100 Marks Seat No.
Marks
(a) Which are the input-output operator in C++ ? Give suitable example.
Class Book
char B_name[15];
int B_id;
int Price;
};
Book B1;
[ 1 of 4 ] P.T.O.
17432 [ 2 of 4 ]
(f) Define derived class. Give one example.
(c) What are the rules governing the declaration of a destructor member
function ?
(f) Write a program to declare class Account having data member as acc_no and
balance. Accept and display data for five object using pointer to array of object.
(d) Write a program using function overloading to swap two integer number and
swap two float number.
(f) How memory is allocated when multiple object of class are created ? Explain
with example.
(b) What is copy constructor ? Give the syntax and example for copy constructor.
(c) Explain scope resolution operator and memory management operator in C++.
Staff
Code
Teacher Officer
Subject Grade
Fig. 1
P.T.O.
17432 [ 4 of 4 ]
5. Attempt any FOUR of the following : 16
(a) State any four rules for operator overloading.
(b) Give syntax and example of defining structure and declaring structure variables.
(c) Create class shape. Derive two classes Triangle and Rectangle. Accept
dimensions of Triangle and Rectangle with appropriate functions. Make area()
function virtual which is common to all classes. With area function calculate
area of triangle and rectangle. Display the result.
(d) What are the features of procedure oriented programming ?
(e) Write a program to search a character in a string using pointer.
(f) Differentiate between compile time polymorphism and runtime polymorphism.
(4 points)
Student
Roll_no
Test Sports
Marks Score
Result
Total_Score
Fig. 2
(c) Write a program to display string in reverse order by using pointer.
__________