CS-72 : C++ And Object Oriented Programming-December,2007

  JHARKHAND BOARD You are here
BACHELOR IN COMPUTER APPLICATIONS -

Term-End Examination

December, 2007

CS-72 : C++ AND OBJECT ORIENTED PROGRAMMING

Time : 2 hours Maximum Marks : 60

Note:

(i) Question number 1 is compulsory.

(ii) Attempt any three questions from the rest.

1. (a) Differentiate between Procedural Programming and Object Oriented Programming. List and explain the components of OOP. Also explain any five characteristics of OOP.(8)

(b) What is Inheritance? Explain, with examples, the various types of inheritance. Explain any four advantages of inheritance.(6)

(c) What are templates ? Write their syntax and usage.

Design a function template in C++ to sort an array. 10

(d) What is the significance of function overloading ?

Explain the various methods for overloading

functions, giving examples of-each. 6

2. (a) Justify the need of the scope resolution operator for accessing global variables, with an example. (4)

(b) What are friend function and friend class ? Write a program to add 2 distances using friend function expressed in meters & cm and feet & inches.(6)

3. (a) What is Operator Overloading ? Overload the operator for adding two complex numbers.(5)

(b) What is Polymorphism ? How do we attain Run time Polymorphism ? Explain with an example.(5)

4. (a) What are Streams ? Explain the input and output streams. Write a program to demonstrate the application of either the input or output operator for user defined types.(5)

(b) What are Macros ? Explain their advantages and usage with an example.(5)

5. Write short notes on the following with a suitable example for each (10)

(a) SIZEOF operator

(b) Bitwise operator

(c) Use Case Diagram

(d) Nested Classes

(e) Copy Constructor