CS/B.
TECH(N)/EVEN/SEM-4/4823/2024-2025/I009
MAULANA ABUL KALAM AZAD UNIVERSITY OF TECHNOLOGY, WEST BENGAL
Paper Code : PC-ECS401/PCC-CSBS402 OBJECT ORIENTED PROGRAMMING
UPID : 004823
Time Allotted : 3 Hours Full Marks :70
The Figures in the margin indicate full marks.
Candidate are required to give their answers in their own words as far as practicable
Group-A (Very Short Answer Type Question)
1. Answer any ten of the following : [ 1 x 10 = 10 ]
(I) What is a reference variable?
(II) Define 'class' with respect to object oriented programming.
(III) What is exception handling?
(IV) Explain the concept of virtual base class briefly?
(V) What is Templates in C++?
(VI) Mention the two different types of files used in OOP technique?
(VII) What is Object-Oriented Analysis and Design?
(VIII) If, a=3; b=5; c=8;
a + = b * = c -- = 5; Find the final value of a, b, c.
(IX) When is void () return type used?
(X) What is an object?
(XI) What happens if you do not provide any constructor to a class?
(XII) Explain the concept of pure virtual function with respect to OOP.
Group-B (Short Answer Type Question)
Answer any three of the following : [ 5 x 3 = 15 ]
2. When do we declare a member of a class as STATIC? What is their implication? Explain with examples. [5]
3. Write a C++ program segment to overload the “+” operator to add two complex numbers. [5]
4. Explain overloading of C++ template. [5]
5. What are the file streams? Explain the process of opening, reading, writing, and closing a file. [5]
6. Discuss how dynamic allocation is achieved in C++ programming. Differentiate between new and malloc() [5]
using a piece of code.
Group-C (Long Answer Type Question)
Answer any three of the following : [ 15 x 3 = 45 ]
7. What is inheritance? List and explain all types of inheritance supported in C++. What is the difference [ 2+8+5 ]
between multiple and multilevel inheritance?
8. (a) What is type conversion? Explain two types of conversion with examples. [ 2+4 ]
(b) Explain the switch statement with appropriate syntax and an example. [4]
(c) Write a CPP program that takes from the user an arithmetic operator (+, -, /, *) and two operands. [5]
Perform the corresponding arithmetic operation on the operands using the switch statement.
9. (a) Explain pass-by-value, pass-by-pointer and pass-by-reference. [6]
(b) What is function overloading? Write rules of function overloading in C++. [ 2+4 ]
(c) Sometimes function overloading makes ambiguity. Explain with an example. [3]
10. (a) Write a C++ program to create a class Worker with data members as worker-name, no-of-hours- [ 10 ]
worked, pay-rate. Write necessary member functions to calculate and display the salary of workers.
(Use default value for pay-rate).
(b) Explain the visibility scope of private, public and protected access specifiers. [5]
11. (a) What do you mean by operator overloading and method overloading? Write a distance class which [ 3+8 ]
contains data members of distance in meters, centimetres and millimetres. The class must have
overloaded operators for addition + and subtraction- respectively.
(b) Virtual base class and when do we make it? [4]
1/1