Oop Preliminary Exam - 2008

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Oop Preliminary Exam - 2008 as PDF for free.

More details

  • Words: 440
  • Pages: 2
K. K. Wagh Polytechnic, Nashik – 3 Preliminary Examination November – 2008 Class Duration

:-3/C : - 3 Hours

Branch: - IF

Subject Code: - 9036 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 a) b) c) d) e) f) g) h) i) j)

Attempt any Eight. (8 × 2) Draw the structural diagram of hierarchical inheritance. What is cin and cout? Explain. Write syntax, how to define member function outside of class? Give the use of static member function. What is use of setiosflags ( )? State, how to remove already set ios flags? Define pure virtual function with example. Describe the use delete operator. Write the syntax of destructor. State the difference between private and protected.

16

Q.2 a) b) c)

Attempt any Three. (3 × 4) 12 What is virtual base class? Explain with suitable example. Describe the different access specifiers used in 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 Subject

Officer Grade

Q.5 Attempt the following. (2 × 6) 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 a) b) c)

12

Attempt any Three. (3 × 4) 12 Write a program to copy contents of one file into another file. What do you mean by manipulator? Describe, how to create your own manipulator? 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. --------

Related Documents