How To Exam?

a knowledge trading engine...


Biju Patnaik University of Technology 2010 B.Tech Electronics and Tele-Communication Engineering C++ and object oriented programming - Question Paper

Friday, 24 May 2013 04:35Web

4th SEMESTER EXAMINATION-2010
C++ AND OBJECT ORIENTED PROGRAMMING
FULL MARKS-70
TIME:3 HOURS
ans ques. No.1 which is compulsory and any 5 from the rest.
The figures in the right-hand margin indicate marks.

1.Answer the subsequent questions: [2*10]

(a) What is an iterator in C++?

(b) For the statement:
A ob;
ob1=20;
which mechanism should be carried out for successful execution of the above statements?

(c) What is the work of set_terminate() function?

(d) For the subsequent function definition:
void abc(int a,int b=10,int c=20)
{
cout< }
what will be the output of the subsequent function calls:
abc(5,6);
abc(50);

(e) What is the work of catch(...)?

(f) What is a pure virtual function?Why is it used?

(g) For the subsequent declaration:
#define sqr(x) {return x*x;}
what will be the outcome of the function call:
sqr(4+4)?

(h) What is the difference ranging from a template class and a class template?

(i) define call by reference.

(j) describe an inline function.


2. What is inheritance?Describe the different kinds of inheritances with examples for every one. [10]

3. what is function overriding?How can we eliminate function overriding,describe with suitable example. [10]

4. Consider a multilevel inheritance with classes A,B,C and D.
Here A is the topmost parent class,B is its child,C is the child of B,D is the child of C.
A is an abstract class containing member function get() to learn any value,which is implemented in B and C for studying value i.e. get() in B reads value x as member and get() in C reads value y as member,class D contains a member function add() to add x and y.
Write a C++ program for the above. [10]

5. What is an exception,describe the mechanisms of exception handling with suitable examples? [10]

6. What is a constructor;explain its kinds with suitable examples from every. [10]

7. Create a class complex with real and imaginary parts as member variables,member functions get() and disp() to input & display the complex number respectively.Write a program using the above class to overload + and - operators for performing addition and subtraction of 2 complex numbers. [10]

8. Create 2 classes Meter and Centimeter to represent meters and centimeters respectively.Use improper conversion routines to convert
(a)Meters to Centimeters and
(b)Centimeters to meters. [5+5]


( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Biju Patnaik University of Technology 2010 B.Tech Electronics and Tele-Communication Engineering C++ and object oriented programming - Question Paper