SPPU Computer Engineering (Semester 3)
Object Oriented Programming
December 2016
Total marks: --
Total time: --
INSTRUCTIONS
(1) Assume appropriate data and state your reasons
(2) Marks are given to the right of every question
(3) Draw neat diagrams wherever necessary


Solve any one question fromQ.1(a,b,c,d) and Q.2(a,b,c)
1(a) Compare Procedure Oriented Programming Vs Object Oriented Programming.
4 M
1(b) What is Friend function?
2 M
1(c) Define class number which has inline function mult ( ) and cube ( ) for circulating the multiplication of 2 double numbers given and cube of the integer number given.
4 M
1(d) What is the use of 'this' pointer?
2 M

2(a) Discuss the ways in which inheritance promotes software reuse, save times during program development and helps prevent errors.
4 M
2(b) Define a class string and use overloaded == operator to compare two strings.
5 M
2(c) Explain abstract class with an example.
3 M

Solve any one question fromQ.3(a,b,c) and Q.4(a,b,c)
3(a) How smart pointers avoids the problem of memory leak?
4 M
3(b) Differentiate compile time and run time polymorphism.
4 M
3(c) Explain virtual base class and virtual function with example.
4 M

4(a) Why we need Templates in C++?
2 M
4(b) Explain exception handling mechanism in C++? Write a program in C++ to handle " divide by zero" exception.
6 M
4(c) Explain class gtemplate and function template with an example.
4 M

Solve any one question fromQ5(a,b) and Q.6(a,b)
5(a) What is a stream? Explain types of streams available in C++.
6 M
5(b) Write a program using open(), eof(), and getline () member functions to open and read a file content line by line.
7 M

6(a) Write a program that returns the size in bytes of a program enetered on the command line: $ filesize program txt.
7 M
6(b) What are cin and cout? Explain isostream.
6 M

Solve any one question fromQ.7(a,b) and Q.8(a,b)
7(a) What is the purpose of Interator? Elaborate forward, biddirectional and random-access interators with suitable examples.
7 M
7(b) What is a stack? How is it implemented using STL?
6 M

8(a) Elaborate advantages and disadvantages of the following Basic Sequence Containers:
i) Vector ii) List.
6 M
8(b) What is STL? Why should a C++ programmer be interested in the STL? What is the design philosophy of the STL? What are the major components of the STL?
7 M



More question papers from Object Oriented Programming
SPONSORED ADVERTISEMENTS