VTU Computer Science (Semester 3)
Object Oriented Programming with C++
June 2013
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


1 (a) What is a statement? Explain jump statement with syntax.
8 M
1 (b) What is inline function? Write a C++ program to find maximum of 2 numbers using inline function.
4 M
1 (c) What is function overloading? Explain with example, why function overloading is important?
8 M

2 (a) What is class? Explain the syntax of class.
8 M
2 (b) Mention the restrictions that are placed on static member functions.
4 M
2 (c) What is parameterized constructor? Explain the different methods of passing arguments to the parameterized constructor with example.
8 M

3 (a) What are friend functions? What are the advantages of using friend functions? Write a C++ program to find sum of 2 numbers, using friend functions.
8 M
3 (b) what are generic functions? Explain with syntax.
4 M
3 (c) Write a C++ program to demonstrate the addition of two longitude and latitude values by overloading + operator.
8 M

4 (a) What is inheritance? Explain the syntax of defining derived classes.
8 M
4 (b) What is copy constructor? When the copy constructor is empoyed? Explain with syntax.
4 M
4 (c) Explain protected base-class inheritance, with suitable example.
8 M

5 (a) Explain when constructors and destructors are executed? Explain the order of invocation of constructor and destructor in multilevel inheritance with suitable program.
10 M
5 (b) Explain how to pass parameters to bas-class constructors., with suitable program.
10 M

6 (a) What is virtual function? What is the use of virtual function? Write a C++ program to demonstrate calling of virtual function through a base class relevance.
10 M
6 (b) What is pure virtual function? Explain with syntax.
4 M
6 (c) What is an abstract class? How it supports run-time polymorphism?
2 M
6 (d) Mention the difference between early binding and late binding.
4 M

7 (a) What are streams in C++? Mention four buit-in streams that are automatically opened whe a C++ program beings execution.
6 M
7 (b) Explain width(), precision() and fill() functions.
6 M
7 (c) What are I/O manipulators? List and mention the purpose of C++ I/O manipulators.
8 M

8 (a) What is exception? Explain the syntax of try and catch.
5 M
8 (b) What are containers? Mention any four container classes defined by STL.
5 M
8 (c) Explain any six commonly used member function defined by vector.
6 M
8 (d) Explain any four commonly used member functions of map.
4 M



More question papers from Object Oriented Programming with C++
SPONSORED ADVERTISEMENTS