Oop Sample Question Paper - 3

  • 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 Sample Question Paper - 3 as PDF for free.

More details

  • Words: 439
  • Pages: 2
Sample Question Paper – III

9036 3 Hours / 80 Marks

Seat No.

Q 1: Attempt any Eight of the following: (2 x 8 = 16) a) Draw the diagram of hierarchical inheritance. b) Why cin and cout are not keywords? c) Write syntax, how to define member function outside of class? d) What is forward declaration? e) Give the use of const member function. f) What is use of setiosflags ( )? g) How to remove already set ios flags? h) Why class containing pure virtual function is an abstract class? i) Explain the use -> operator. j) What use of :: ( scope resolution operator.) k) Give syntax multiple inheritance. Q 2: Attempt any THREE of the following: (4 x 3=12) a) Explain how ‘protected’ is different than ‘private’ with example. b) Write the rules for operator overloading. c) Explain use of destructor with example. d) How to call array of object using pointers? Q 3: Attempt any THREE of the following: (4 x 3=12) a) How to nest the classes? Explain with suitable example. b) Explain put ( ) & getline ( ) function of stream classes. c) How to handle the file in binary mode? d) Write a program which calls constructor with default arguments. Q 4: Attempt any THREE of the following: (4 x 3=12) a) Differentiate procedure oriented & object oriented programming. b) Explain significance of static functions. c) Write a program to find number of vowels in user entered string. d) Explain how can you convert no on decimal, hex, & octal equivalent. e) Give detailed use of noreplace & nocreate file opening modes. Q 5 : Attempt any THREE of the following: (4 x 3=12) a) Find out error it any in following code. class Triple { int i; Triple ( ) { i = 10; } public: Triple (int x) { -1-

i = x; } }; void main ( ) { Triple T (20); } b) If a function is called by value & called by reference then is it overloaded? Justify. c) Explain, how to overload pre-increment & post-increment operators? d) Constructors can be overload. Justify. Q 6: Attempt any TWO of the following: (8 x 2=16) a) Write a program to implement multiple inheritance of following figure. Use virtual base class. Account

Sav_Account

Cur_Account

Fixed_dep_acc

b) Write a program to open file in reading mode & copy only uppercase letters from that into another file use istream & ostream only. c) i) Different structure & class. ii) Write a program to accept two strings from user & concatenate one string to another using pointer to string.

-2-

Related Documents