written 7.3 years ago by |
Object Oriented Programming with C++ - Jun 2014
Computer Engineering (Semester 4)
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) Define with examples
(1) Object (2) Macro (3) Binary file (4) Portability.(8 marks)
1 (b) Write the basic structure of a C++ program with all necessary blocks.(6 marks)
2 (a) Differentiate procedural programming with object oriented programming(7 marks)
2 (b) What is call and return by reference? Explain with example.(7 marks)
2 (c) What is inline function? Where and how it is useful in C++? Give an example.(7 marks)
3 (a) Discuss the use of static data members and static member functions with examples.(7 marks)
3 (b) What is a constructor? Explain types of constructors with examples.(7 marks)
3 (c) Explain the importance of Inheritance. List its types and explain any one with example.(7 marks)
3 (d) Explain the use of destructor in C++. Discuss its features.(7 marks)
4 (a) Write a C++ program that overloads + operator to add two complex numbers.(7 marks)
4 (b) List ios functions with equivalent manipulators in C++. Explain any one
manipulator with example.(7 marks)
4 (c) Write a C++ program that creates inventory of items by storing item_code, item name and qty. Access the data using pointers.(7 marks)
4 (d) What is polymorphism? How can we implement it in C++?(7 marks)
Attempt ANY TWO
5 (a) 1) List the file mode parameters.(4 marks) 5 (a) 2) Explain try....catch....throw(4 marks) 5 (a) 3 Components of STL.(4 marks)
Attempt ANY THREE
5 (b) 1) Structure of Template class.(2 marks) 5 (b) 2) List error handling file functions in C++(2 marks) 5 (b) 3) Protected data members.(2 marks) 5 (b) 4) Define friend function(2 marks)