Oop Msbte Question Paper Winter 2007

  • 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 Msbte Question Paper Winter 2007 as PDF for free.

More details

  • Words: 555
  • Pages: 3
9036 0708-I 3

Hours

/ 80 Marks

Seat No. ___________________________________________________ Instructions

1.

- (1) All Questions are compulsory. (2) Answer each next main Question on a new page. (3) Figures to the right indicate full marks. (4) Assume suitable data, if necessary. (5) Use of non-programmable Electronic Pocket Calculator is permissible.

Marks 16 Attempt ant EIGHT of the following: a) List any four object oriented programming languages. b) Give syntax and example of defining structure and declaring structure variable. c) What is class? Give examples. d) How memory is allocated when multiple object of a class are created ? Explain with suitable example. e) Define following terms: (i) Default constructor (ii) Parameterized constructor f) What is destructor? How many destructors can be defined in a single class ? g) What is need of operator overloading? h) Give significance of ‘&’ operator and ‘*’ operator. i) Elaborate concept of overloading with example. j) What is difference between compile-time polymorphism and run-time polymorphism ? 12 2. Attempt any THREE of the following : a) Can we create object of one class in definition of other class? Explain with suitable example.

Object Oriented Programming: MSBTE Question Paper, Winter - 2007

b) Explain concept of virtual base class with suitable example. c) Define two functions with same name one return area of circle whereas another returns area of rectangle. Test these functions. d) Can we use base class pointer for accessing member function of derived class? Explain with suitable example. 3. Attempt any THREE of the following : 12 a) Differentiate between calling function by value and calling function by reference. Give suitable examples. b) Write a program to find length of string (without using strlen( ) function) c) Illustrate uses of virtual function with suitable. d) Overload increment operator for class ‘point’ having data member as x co-ordinate and y co-ordinate. 4. Attempt any TWO of the following : 16 a) Write a program to declare a class student Containing data member roll number, name and percentage of marks. Read data for 2 students and display data of student having higher percentage of marks. b) What do you mean by default argument? Illustrate concept of constructor with default argument, with suitable example. c) Identify inheritance shown in following figure. Implement it by assuming member function. Class Name :

Student

Member Variable :Roll No., Name Class Name : Exam Member Variable : Subject Name

Class Name : Library Member Variable :Membership No.

Object Oriented Programming: MSBTE Question Paper, Winter - 2007

5. a) Attempt the following : 12 Explain difference between structure and class with example. b) Attempt any ONE of the following: (i) Write a program that counts number of vowels in a string. (ii)Write a program that copies contents of one file into another file. 6. Attempt any THREE of following : a) Find errors from following code. Rectify the code. class complex { int real,imaginary; public : void complex( ); void Read data( ); void Show data ( ); }

12

void main( ) { Complex c1 ; c1.Read data( ); c1.Display ( ); } b) Explain use of following function with suitable examples. d) Explain use of ios::nocreate and ios::noreplace. e) Describe built- in function for reading a line of text from file. Give example. ______________

Object Oriented Programming: MSBTE Question Paper, Winter - 2007

Related Documents