How To Exam?

a knowledge trading engine...


Punjab Technical University 2005-3rd Sem B.E Computer Science OBJECT ORIENTED PROGRAMMING USING C++ (New) CS 252 2k5 - Question Paper

Tuesday, 09 April 2013 08:40Web

OBJECT ORIENTED PROGRAMMING USING C++ (New) CS 252 May 2k5

Max marks 60


Note: part A is compulsory. Attempt any 4 ques. from part B and 2 from part C.
part A Marks two every

1.
(a) What does the name C++ signify? What is info hiding?
(b) How is the subsequent expression evaluated?

(x
(c) What is the difference ranging from static and dynamic binding?
(d) How many times is the copy constructor called in the subsequent code?

window f(window u)
{
window v(u);
window w=v;
return w;
}
Main()
{
window x;
window y=f(f(x));

}
(e) How do the various constructors and destructors behave in an Inheritance hierarchy?
(f) Explain syntactic rules for the subsequent random access file member functions:
(i) seekg
(ii) seekp
(iii) tellg
(iv) tellp
(g) What is a scope resolution operator? What part does it play in definition of member functions?
(h) What is a pure virtual member function? elaborate the different rules associated with it?
(i) Find errors if any:
(A) switch (c) (B) for(int m=0;m case: one total=sum +m
case 2
default break;
}
(j) Can ‘this’ pointer be used in non-member functions?

part B Marks five every

2. elaborate the different kinds of constructors used with the classes? discuss with examples.

3. Does multiple inheritance lead to ambiguity? How can the ambiguity be removed?

4. Write a C++ program to do all the arithmetic operations using the concept of operator overloading.

5. Write a C++ program to copy the contents f 1 file to a different file.

6. What is recursion? discuss with example. elaborate the disadvantages of using recursion? Why and where is it used?

part C Marks 10 every

7. discuss the concept of a friend function with the help of examples, elaborate the differences ranging from FRIEND function, IN-LINE and normal functions?

8. (a) Write a program that instantiates a function template that implements a binary search of a sorted array of objects.
(b) discuss the concept of Polymorphism. provide an example to show run-time polymorphism.

9. (a) In a class of students, it is needed to display the marks in subjects of PHYSICS, CHEMISTRY and MATHS. Implement the identical program for processing of marks of all the students using the concept of inheritance.

(b) Difference ranging from pointer to function and pointer as function argument. Distinguish ranging from (*m)[7] and *m[7].



( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Punjab Technical University 2005-3rd Sem B.E Computer Science OBJECT ORIENTED PROGRAMMING USING C++ (New) CS 252 2k5 - Question Paper