Sie sind auf Seite 1von 2

K. K.

Wagh Polytechnic, Nashik – 3


Preliminary Examination November – 2008
Class :-3/C Branch: - IF Subject Code: - 9036
Duration : - 3 Hours Max. Marks : - 80
=======================================================================================
Instructions to candidate:-
1) All questions are compulsory.
2) Assume suitable additional data, if necessary.
3) Use proper writing and presentation skill.

Q.1 Attempt any Eight. (8 × 2) 16


a) Draw the structural diagram of hierarchical inheritance.
b) What is cin and cout? Explain.
c) Write syntax, how to define member function outside of class?
d) Give the use of static member function.
e) What is use of setiosflags ( )?
f) State, how to remove already set ios flags?
g) Define pure virtual function with example.
h) Describe the use delete operator.
i) Write the syntax of destructor.
j) State the difference between private and protected.

Q.2 Attempt any Three. (3 × 4) 12


a) What is virtual base class? Explain with suitable example.
b) Describe the different access specifiers used in C++.
c) Write a program to demonstrate the overloading of any unary operator using friend
operator function.
d) Write a program to implement the inheritance as shown in the figure below. Assume
suitable member functions.

class name : Box


member variables:
length, width, height

class name : Cupboard


member variables :
no_of_shleves

Q.3 Attempt any Three. (3 × 4) 12


a) Describe the function of this pointer.
b) Differentiate between calling function by value and calling function by reference. Give
suitable examples.
c) Elaborate concept of function overloading with example.
d) Illustrate the concept of constructor with default arguments with appropriate example.

Q.4 Attempt any Two. (2 × 8) 16


a) Write a program to input two strings from keyboard and concatenate them using
pointer to string (don’t use library function strcat).
b) Describe following terms:
i. Object
ii. Class
c) Write a program for following hierarchy inheritance in the given figure below. Assume
suitable member functions.

Staff
Code

Teacher Officer
Subject Grade

Q.5 Attempt the following. (2 × 6) 12


a) Describe memory allocation of objects.
b) Attempt any one of the following:
i. Describe the error handling functions of file streams.
ii. Give significance of ‘ & ’ operator and ‘ * ’ operator.

Q.6 Attempt any Three. (3 × 4) 12


a) Write a program to copy contents of one file into another file.
b) What do you mean by manipulator? Describe, how to create your own manipulator?
c) Give syntax and use of following with respect to file:
i. get( )
ii. put( )
d) How we open file using constructor? Write any program for opening files with
constructor function.

--------

Das könnte Ihnen auch gefallen