RTU Previous Question Papers B-Tech CSE 3rd Semester Object Oriented Programming Feb 2010
RTU Previous Question Papers B-Tech CSE 3rd Semester
Object Oriented Programming Feb 2010
Paper Code: 3 E2074
1. Explain structure as a user defined data type in C with the help of suitable example.
1. a) Explain following with their syntax :
i) pointer to structure
ii) parsing structure to function
iii) array of structure.
b) What is the difference between structured programming and object oriented programming?
2. a) What is constructor? How many types of constructors are in C++? Describe with the help of a suitable example.
b) Define followings :
i) Reference variables in C++
ii) Static member function
iii) This pointer.
2. a) What is friend function? Write a program to swap private data of two classes. b) Differentiate followings:
i) Objects and classes
ii) Data abstraction and encapsulation
iii) Inline function and macro
iv) Constructor and destructor
3. What is operator overloading? How many arguments are required to overload unary and binary operators, respectively? Define a class string, use overloaded == operator to compare two strings.
3. a) What is type conversion in C++? How it is achieved in user defined data types?
b) What is function overloading? Explain with the help of a suitable example.
4. What is inheritance? What are the various forms of inheritance? Explain each with the help of examples.
4. What is polymorphism? How is it achieved at compile time and runtime? Explain both with the help of example.
5. What is generic programming? How is it implemented in C++? Write a program to implement sorting using templates.
5. Write short notes on : (any two)
a) Exception handling
b) Virtual Base Class
c) Multiple inheritance.