0% found this document useful (0 votes)
38 views

Object Oriented Programmingthrough C++ March 2021

The document contains information about a C++ programming exam for a computer science course. It includes 10 questions across 3 sets that cover various C++ and object-oriented programming concepts like procedural vs OOP, classes, inheritance, polymorphism, templates, and exceptions. Students must answer 5 questions by choosing 1 question from each set. The exam aims to test students' understanding of fundamental and advanced C++ concepts through explanations and example programs.

Uploaded by

Pradeepkumar 05
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Object Oriented Programmingthrough C++ March 2021

The document contains information about a C++ programming exam for a computer science course. It includes 10 questions across 3 sets that cover various C++ and object-oriented programming concepts like procedural vs OOP, classes, inheritance, polymorphism, templates, and exceptions. Students must answer 5 questions by choosing 1 question from each set. The exam aims to test students' understanding of fundamental and advanced C++ concepts through explanations and example programs.

Uploaded by

Pradeepkumar 05
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Code No: R1921055 R19 SET - 1

II B. Tech I Semester Regular Examinations, March - 2021


OBJECT ORIENTED PROGRAMMINGTHROUGH C++
(Computer Science &Engineering)
Time: 3 hours Max. Marks: 75
Answer any FIVE Questions each Question from each unit
All Questions carry Equal Marks
~~~~~~~~~~~~~~~~~~~~~~~~~

1 a) What are the drawbacks of procedural languages? Explain the need of Object- 8M
Oriented programming with a suitable example.
b) Describe the features of Object-Oriented Programming. 7M

Or
2 a) Write the most significant differences between C and C++. 5M
b) Explain in detail the four major principles of Object-Oriented Programming 10M
paradigm with suitable examples.
3 a) What are objects and how they are created from Class? Explain with a sample 8M
program.
b) Explain about the different mechanisms in C++ to protect the members of an 7M
object.
Or
4 a) What is a Constructor? What is the main purpose of Constructors? How to 10M
invoke a constructor in C++? Explain.
b) Explain the principles and benefits of method overloading in C++ programming. 5M
5 a) What is the significance of inheritance? Explain various types of inheritance 15M
with suitable example for each.
Or
6 a) Why do we use virtual base class in C++? Give explanation. 5M
b) Write a C++ program to illustrate the importance of overloading Binary operator 10M
‘+’ for adding two complex numbers.
7 a) What is meant by Dynamic binding? And also Explain its implementation in 15M
C++ with a sample program.
Or
8 a) Define Pointer. How to declare, initialize and access pointers in C++? Explain. 8M
b) Write the differences between virtual and pure virtual functions in C++. 7M
9 a) What is Exception Handling? Explain various keywords involved in C++ 8M
exception handling.
b) Write a C++ program to sort an unordered list of elements using function 7M
templates.
Or
10 a) Explain in detail about the four important components of C++ Standard 15M
Template Library.
1 of 1

||''|''||''||''''''|
Code No: R1921055 R19 SET - 2

II B. Tech I Semester Regular Examinations, March - 2021


OBJECT ORIENTED PROGRAMMINGTHROUGH C++
(Computer Science & Engineering)
Time: 3 hours Max. Marks: 75
Answer any FIVE Questions each Question from each unit
All Questions carry Equal Marks
~~~~~~~~~~~~~~~~~~~~~~~~~
1 a) Explain the limitations of conventional procedural programming.
8M
b) Describe the characteristics of Object-Oriented Programming
7M
Or
2 a) Explain about Inheritance and Polymorphism features of Object Oriented
Programming. 8M
b) Mention the promising application areasof Object-Oriented Programming in real
time environment. 7M
3 a) What are objects and how they are created from class? Explain with a C++
program. 8M
b) Describe the special characteristics of Constructors with a C++ program. 7M
Or
4 a) Why do we need Nested classes in C++ programming? Write a C++ program to
demonstrate the necessity of nested classes. 8M
b) Discuss the characteristics of Destructor in C++ programming.
7M
5 a) How does inheritance help achieve code reuse? Explain.
5M
b) Explain various forms of inheritance supported by C++.
10M
Or
6 a) Write a C++ program to illustrate the importance of overloading Binary operator
‘-’ to subtract two complex numbers. 12M
b) Mention the list of operators which cannot be overloaded in C++.
3M
7 a) How does C++ achieve compile time polymorphism? Explain.
8M
b) Write a C++ program to demonstrate dynamic method dispatch in C++.
7M
Or
8 a) How do you declare a pointer to an object in C++? Explain with an example
program. 8M
b) Explain the purpose of Virtual destructors in C++ with a sample program. 7M
9 a) What is Exception Handling? Explain various keywords involved in C++
exception handling. 8M
b) What is Function template? Can a class member function template be virtual?
Explain. 7M
Or
10 a) How are templates different from macros? Explain.
8M
b) Explain in detail about iterators in C++.
7M
1 of 1

||''|''||''||''''''|
Code No: R1921055 R19 SET - 31

II B. Tech I Semester Regular Examinations, March - 2021


OBJECT ORIENTED PROGRAMMINGTHROUGH C++
(Computer Science & Engineering)

Time: 3 hours Max. Marks: 75


Answer any FIVE Questions each Question from each unit
All Questions carry Equal Marks
~~~~~~~~~~~~~~~~~~~~~~~~~

1 a) What are the advantages and disadvantages of procedural programming? 8M


b) What are Objects and Classes in Object Oriented Programming? Explain. 7M

Or
2 a) Write the differences between C and C++ programming. 8M
b) What is Data Abstraction and Encapsulation in C++? Explain with a real time 7M
example.
3 a) Explain about access specifiers in C++ programming. 8M
b) What is a constructor? Explain various forms of constructors with suitable 7M
example.
Or
4 a) What are the benefits of Method overloading in programming? Explain the 10M
concept of Method overloading with a C++ program.
b) Is it possible to call destructor explicitly in C++? Give explanation with a 5M
sample code.
5 a) What is inheritance? List the different types of inheritance and explain how it 15M
encourages reusability and sharing?
Or
6 a) What are Virtual classes? Explain the need for Virtual classes with a suitable 8M
example.
b) Write the rules of overloading operators in C++. 7M
7 a) Why Polymorphism is needed in programming? Explain about the types of 15M
polymorphism with necessary example C++ programs.
Or
8 a) What is a class pointer? What is the size of an object pointer? Give explanation. 8M
b) Explain about virtual functions in C++ with a program. 7M
9 a) Write about Exception handling in C++ with an example program. 8M
b) Explain the concept of ret rowing exceptions in C++. 7M

Or
10 a) Differentiate between templates and macros. 5M
b) With an example, explain various types of container classes in C++. 10M

1 of 1

||''|''||''||''''''|
Code No: R1921055 R19 SET - 4

II B. Tech I Semester Regular Examinations, March - 2021


OBJECT ORIENTED PROGRAMMINGTHROUGH C++
(Computer Science & Engineering)
Time: 3 hours Max. Marks: 75
Answer any FIVE Questions each Question from each unit
All Questions carry Equal Marks
~~~~~~~~~~~~~~~~~~~~~~~~~
1 a) Is object-oriented programming better than procedural programming? Explain. 8M
b) What is meant by Data encapsulation in Object Oriented Programming? How 7M
does Data Encapsulation ensure data security? Explain.
Or
2 a) Explain in detail about Class, Objects, Methods and Messages. 8M
b) Discuss the importance of Polymorphism with a suitable example. 7M
3 a) Explain the concept of constructors and destructors in detail with an example 15M
program.
Or
4 a) Create a class in C++ program to print the area of a square and a rectangle. The 8M
class has two methods with the same name but different number of parameters.
The method for printing area of rectangle has two parameters which are length
and breadth respectively while the other method for printing area of square has
one parameter which is side of square.
b) What are the design considerations that might cause one to use an Anonymous 7M
object? What are the advantages and disadvantages?
5 a) Why do we need pure virtual function in C++? 5M
b) Write a C++ program to overload the binary operator ‘+’ to Concatenate two 10M
strings
Or
6 a) What is the significance of inheritance? Explain various types of inheritance 10M
with suitable example
b) What is an Abstract class? Explain the importance of Abstract classes with a 5M
sample C++ program.
7 a) Write a C++ program to illustrate the importance of ‘this’ pointer. 8M
b) Explain about run time polymorphism in C++ with a sample program. 7M

Or
8 a) What is meant by function binding in programming? Explain about Early and 8M
Late binding in C++.
b) Why do we need Virtual destructors in C++? Explain. 7M
9 a) What do you mean by an Exception and Error? Explain about the keywords 8M
related to exception handling in C++.
b) How to define User-defined Exceptions in C++? Explain with a sample code 7M
snippet.
Or
10 How many associative containers are provided by C++? Explain. 15M
1 of 1
||''|''||''||''''''|

You might also like