0% found this document useful (0 votes)
195 views2 pages

OOP Preliminary Exam - 2008

This document contains instructions and questions for a C++ preliminary examination. It is divided into 6 questions. Question 1 has 8 short answer questions worth 2 marks each. Question 2 has 3 short questions worth 4 marks each. Question 3 also has 3 short questions worth 4 marks each. Question 4 has 2 long answer questions worth 8 marks each. Question 5 has 2 parts, one worth 6 marks and the other asking to attempt one of two short questions. Question 6 has 4 short answer questions worth 4 marks each. The document provides instructions to candidates to answer all questions, assume additional data if needed, and use proper writing and presentation skills.

Uploaded by

api-3728136
Copyright
© Attribution Non-Commercial (BY-NC)
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)
195 views2 pages

OOP Preliminary Exam - 2008

This document contains instructions and questions for a C++ preliminary examination. It is divided into 6 questions. Question 1 has 8 short answer questions worth 2 marks each. Question 2 has 3 short questions worth 4 marks each. Question 3 also has 3 short questions worth 4 marks each. Question 4 has 2 long answer questions worth 8 marks each. Question 5 has 2 parts, one worth 6 marks and the other asking to attempt one of two short questions. Question 6 has 4 short answer questions worth 4 marks each. The document provides instructions to candidates to answer all questions, assume additional data if needed, and use proper writing and presentation skills.

Uploaded by

api-3728136
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 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.

--------

You might also like