PREVIOUS YEAR QUESTION PAPER

CS3201 – OBJECT ORIENTED PROGRAMMING

Anna University

Regulation 2019 Semester 2 2024

Question Paper Details

University Anna University
Degree B.E. Computer Science and Engineering
Department Computer Science and Engineering
Regulation Regulation 2019
Semester 2
Subject Code CS3201
Subject Name OBJECT ORIENTED PROGRAMMING
Exam Session April / May 2024
Duration 3hrs
Maximum Marks 100

View Question Paper PDF

Access the previous year question paper for your examination preparation.

View / Download PDF

How to Use This Question Paper

More Question Papers

Browse other previous year question papers for this subject.

View All Subject Question Papers

Question Paper Intelligence

Automatically extracted historical question data. Academic accuracy and examination rules require verification.

18Extracted entries
100Maximum marks (metadata)
180Duration (minutes)
2Choice candidates

Part-wise extracted questions

Part A10
Part B8

Question type candidates

Other Or Unclassified9
Definition5
Short Description2
Numerical1
Explanation1

Section marks — arithmetic candidates

Part A20 marks
Part B65 marks
Part C15 marks

Examination marks pattern

PartRequired answersMarks per answerSection total
A10220
B51365
C11515

Estimated time allocation

Proportional to section marks. This estimate uses the full exam duration without a separate reading or revision reserve.

Section time budget

Part A36.0 min
Part B117.0 min
Part C27.0 min

Optional-choice evidence

Detected alternatives only. Confirm the actual choice rules in the original question paper.

Part B — Question 11: Option a · Option b
Part B — Question 14: Option a · Option b

Question navigator

Extracted questions

Part A — 1

List any 8 OOPS concepts. | 2 01 L1

Short Description

Source quality review required

Part A — 2

Find the errors and write for the following program. 2 01 L3 using namespace std; #include<iostream.h> class example { private: int data; static int count; public: € example(int y=10) { data = y; } intgetincrement( ) {return ++data; } static intgetcount( ) { cout<<data; return count; } }; void main( ) { example E1,E2; E1.getcount( ); E2=E1.getincrement( ); E2.getcount( ); }

Numerical

Source quality review required

Part A — 3

What is explicit type conversion? Give example. 2 02 L1

Definition

Source quality review required

Part A — 4

Predict the output for the following program. 2 0௦02 | (3 using namespace std; | #include<iostream.h> | static int Count = 0; class Test { public: Test() Count++; cout<< "No. of Object created: "<< Count <<endl; } ~Test() { cout<< "No. of Object destroyed:" <<Count<<endl; Count--; } ; int main() Test t, t1, t2, t3; return 0; } ஓ.

Other Or Unclassified

Source quality review required

Part A — 5

How does protected differ from private? 2 CO3 | [1

Other Or Unclassified

Source quality review required

Part A — 6

What is pure virtual function? Give its syntax. 2 CO3 | L2

Definition

Source quality review required

Part A — 7

Define namespace. 2 CO4 |} L1

Definition

Source quality review required

Part A — 8

What is the use of class template? Give example. 2 CO4 | (2

Definition

Source quality review required

Part A — 9

Print the number 3.1246 using ios functions ( set the width of 8, 2 CO5 | L3 precision of 3 & fill the unused positions with * )

Other Or Unclassified

Source quality review required

Part A — 10

List the sequence and associative containers. 2 CO5 | (1

Short Description

Source quality review required

Part B — 11a

(a)i | Write a C++ program to swap two variables using reference 5 ௦0௦1 L3 variable. ர்‌ | Perform addition of 2 matrices using pointers. 8 CO1 L3

Other Or Unclassified

Source quality review required

Part B — 11b

(b) | Demonstrate function overloading for the addition of 2 numbers. a3 01 L2 9 The two number can be: 2 integers, 2 floats, 1 integer & 1 float, | float & | integer.

Other Or Unclassified

Source quality review required

Part B — 12a

(a)i | Create a class Polynomial with two data members namely, 6 CO2 L3 coefficient and an exponent.Write parameterized constructor to initialize the data members of polynomial and write copy constructor to copy one polynomial to another. Write a complete program to test the above. ர்‌ | Write a class called STRING having an array of characters as 7 CO2 L3 data member. Overload with != operator to compare the two STRING objects. If they are equal, zero is returned, otherwise one is returned. [OR] 12 0) | Overload the - - operator in postfix form to decrement a complex 7 CO2 L5 number. ii | Write a program to define a function add that takes two int 6 CO2 L3 parameters and returns the sum. Write another function sub PENTROS which takes two int parameters and returns the difference. CS Declare and use function pointer to invoke functions. வரி அ PP KA

Other Or Unclassified

Source quality review required

Part B — 13

(ai Explain the various modes of deriving subclasses, with suitable examples. CO3 L2 What is hybrid inheritance? What problem will occur in it? How do you resolve it? Explain with example? CO3 L3

Other Or Unclassified

Source quality review required

Part B — 13b

(b) Define runtime polymorphism? How it is achieved in C++? Implement a book shop which sells both books and video- tapes.Create a Media class that stores the title and price of publication. Create two derived classes, one for storing the number of pages in a book and another class for storing the playing time of a tape. Function display() is used in all the classes to display the class contents. 13 CO3 L4

Definition

Source quality review required

Part B — 14a

(a) Explain the exception handling for the following a. simple try-catch, b.multiple try-catch, c. default catch, d. rethrow with suitable example. 13 CO4

Explanation

Source quality review required

Part B — 14b

(b) Write a program in C++ using function and class template to read two matrices of different data types such as integers and floating point values and perform addition operations on these matrices and display the resultant matrix. 13 C04 L3 Write a C++ program to count the number of words in a text file. CO5 L3 Explain the following unformatted I/O operations —cin, cout, put(), get(), getline(). [OR] 8 5 foe: CO5 L3 Q.No.

Other Or Unclassified

Source quality review required

Part B — 15b

(b) | Write a C++ program to store the integer elements in a vector container & display the vector element, which is smaller than their adjacent right neighbors.

Other Or Unclassified

Source quality review required

Advanced Examination Analysis

Historical analysis based on extracted question papers. Topic classifications, marks and planning estimates are provisional.