OOPS with C++ - Dec 2013
Electronics & Communication (Semester 3)
TOTAL MARKS: 100
TOTAL TIME: 3 HOURS (1) Question 1 is compulsory.
(2) Attempt any four from the remaining questions.
(3) Assume data wherever required.
(4) Figures to the right indicate full marks. 1 (a) Explain various features of object oriented programming.(8 marks) 1 (b) What is inline function? Explain with example. Mention its advantages.(6 marks) 1 (c) What is function overloading? Write a program to swap two integer and two float number using function overloading.(6 marks) 2 (a) What is class? Write a program to create a class called employee which consists name, desg, ecode and salary as a data member and read. Write as a functon member, using this class to read and print 10 employee information.(8 marks) 2 (b) What is constructor? Mention its types. Explain parameterized constructor with an example.(6 marks) 2 (c) Explain three access specifiers.(6 marks) 3 (a) Why friend function is required? Write a program to add two complex number using friend function.(8 marks) 3 (b) Explain generic function with an example.(6 marks) 3 (c) Write a program to overload - + operator.(6 marks) 4 (a) Mention types of inheritance. Explain multiple and multilevel inheritance with example.(8 marks) 4 (b) What is function overriding? Give an example.(6 marks) 4 (c) Write a program to illustrate protected members in base class inheritance.(6 marks) 5 (a) Explain the order of innovocation of constructor and destructor with an example.(10 marks) 5 (b) Explain with an example virtual base class.(5 marks) 5 (c) Explain passing parameter to base class.(5 marks) 6 (a) Difference between early binding and late binding.(6 marks) 6 (b) What is virtual function? Explain with an example.(8 marks) 6 (c) Explain the abstract class with an example.(6 marks) 7 (a) What are the flags that associated with the file operation?(6 marks) 7 (b) Explain the following functions:
i) setfill() ii) width() iii) precision() iv) setiosflags()(8 marks) 7 (c) Mention the name of file movement pointer. Explain each.(6 marks) 8 (a) Explain C++ exception handling function with example.(8 marks) 8 (b) What is vector? Explain function of a vector.(6 marks) 8 (c) Write a program to create a list and sorting the elements of the list.(6 marks)