List any 8 OOPS concepts. | 2 01 L1
Short DescriptionSource quality review required
Anna University
| 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 |
Access the previous year question paper for your examination preparation.
View / Download PDFBrowse other previous year question papers for this subject.
View All Subject Question PapersAutomatically extracted historical question data. Academic accuracy and examination rules require verification.
| Part | Required answers | Marks per answer | Section total |
|---|---|---|---|
| A | 10 | 2 | 20 |
| B | 5 | 13 | 65 |
| C | 1 | 15 | 15 |
Proportional to section marks. This estimate uses the full exam duration without a separate reading or revision reserve.
Detected alternatives only. Confirm the actual choice rules in the original question paper.
List any 8 OOPS concepts. | 2 01 L1
Short DescriptionSource quality review required
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( ); }
NumericalSource quality review required
What is explicit type conversion? Give example. 2 02 L1
DefinitionSource quality review required
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 UnclassifiedSource quality review required
How does protected differ from private? 2 CO3 | [1
Other Or UnclassifiedSource quality review required
What is pure virtual function? Give its syntax. 2 CO3 | L2
DefinitionSource quality review required
Define namespace. 2 CO4 |} L1
DefinitionSource quality review required
What is the use of class template? Give example. 2 CO4 | (2
DefinitionSource quality review required
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 UnclassifiedSource quality review required
List the sequence and associative containers. 2 CO5 | (1
Short DescriptionSource quality review required
(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 UnclassifiedSource quality review required
(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 UnclassifiedSource quality review required
(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 UnclassifiedSource quality review required
(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 UnclassifiedSource quality review required
(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
DefinitionSource quality review required
(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
ExplanationSource quality review required
(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 UnclassifiedSource quality review required
(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 UnclassifiedSource quality review required
Historical analysis based on extracted question papers. Topic classifications, marks and planning estimates are provisional.