Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Summer 2017 Question Paper

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

17432

16172
3 Hours / 100 Marks Seat No.

Instructions : (1) All Questions are compulsory.


(2) Answer each next main Question on a new page.
(3) Illustrate your answers with neat sketches wherever necessary.
(4) Figures to the right indicate full marks.
(5) Assume suitable data, if necessary.

Marks

1. (A) Attempt any SIX of the following : 12

(a) Which are the input-output operator in C++ ? Give suitable example.

(b) Give significance of ‘&’ and ‘*’ operators.

(c) Calculate the size of object B1 defined in following class :

Class Book

char B_name[15];

int B_id;

int Price;

};

Book B1;

(d) List any four types of constructor.

(e) What is polymorphism ? List its types.

[ 1 of 4 ] P.T.O.
17432 [ 2 of 4 ]
(f) Define derived class. Give one example.

(g) Write syntax to create a pointer for object.

(h) Write syntax for overloaded constructor.

(B) Attempt any TWO of the following : 8

(a) What do you mean by default argument ? Illustrate concept of constructor


with default argument using suitable example.

(b) Draw and explain multiple inheritance with suitable example.

(c) What are the rules governing the declaration of a destructor member
function ?

2. Attempt any FOUR of the following : 16

(a) Explain access specifiers with suitable example.

(b) What is virtual function ? Why we need virtual function ?

(c) Write a program that illustrate multilevel inheritance.

(d) Differentiate between POP and OOP. (4 points)

(e) What is static member function ? How is it declare ?

(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.

3. Attempt any FOUR of the following : 16

(a) Explain the structure of C++ program with suitable example.

(b) Explain multiple constructor in class. Give suitable example.


17432 [ 3 of 4 ]
(c) Explain abstract class with suitable example.

(d) Write a program using function overloading to swap two integer number and
swap two float number.

(e) What is ‘this’ pointer ? Give suitable example.

(f) How memory is allocated when multiple object of class are created ? Explain
with example.

4. Attempt any FOUR of the following : 16

(a) Write a program to implement single inheritance. Declare base class


‘Employee’ with emp_no and emp_name. Declare derived class ‘Fitness’ with
height and weight. Accept and display data for one employee.

(b) What is copy constructor ? Give the syntax and example for copy constructor.

(c) Explain scope resolution operator and memory management operator in C++.

(d) Explain friend function with suitable example.

(e) Write a program to implement inheritance as shown in Fig. 1. Assume suitable


member function.

Staff
Code

Teacher Officer
Subject Grade

Fig. 1

(f) Write a program to insert an element at location of array.

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)

6. Attempt any TWO of the following : 16


(a) Write a program to declare a class student consisting of data member stud_name
and Roll_no. Write program with member function accept() to accept and
display() to display the data for four students.
(b) Write a program to implement inheritance as shown in Fig.2 Assume suitable
member function.

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.
__________

You might also like