Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
8 views2 pages

Module - Sample Questions

vit bhopal python questions

Uploaded by

anika.24bai10420
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Module - Sample Questions

vit bhopal python questions

Uploaded by

anika.24bai10420
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Module 1

1. Explain the object-oriented programming (OOP) approach in detail.


2. What is object-oriented programming?
3. Why is OOP preferred over procedural programming?
4. Define and explain the concepts of classes and objects.
5. Discuss encapsulation, data abstraction, inheritance, and polymorphism with
examples.
6. List and explain at least three advantages of OOP.
7. Discuss two limitations or challenges of using OOP.
8. Explain inline functions and their significance.
9. Describe default argument functions with an example.
10. Explain references in C++ programming: (a) Independent reference (b) Function
returning reference (c)Pass by reference with examples.
11. Write a program that demonstrates the use of reference variables.

Module 2

1. Discuss the concept of Classes and Objects in Object-Oriented Programming (OOP).


2. Differentiate between a class and a structure in C++.
3. Discuss the different access specifiers (public, private, protected) and their significance.
4. Explain constructors and their purpose. Define and discuss the importance of copy
constructors with an example. Explain destructors and their role in memory
management.
5. Explain array of objects and its usage with an example.
6. Describe dynamic objects and how they are created and managed in C++.
7. Explain the role of friend functions and friend classes in OOP.
8. Discuss the concept of a container class with an example.
9. Write a main() program that creates an array of objects of the Distance class, where the user
enters the size of the array during execution. The program takes inputs for three objects from
the user, displays the three objects, and finally deletes the array. The class Distance has two
data members, feet and inches, and two function members input() and display().

Module 3

1. Define Polymorphism and explain its significance in OOP.


2. Differentiate between compile-time polymorphism and run-time polymorphism.
3. Discuss function overloading with an example.
4. Explain operator overloading and provide a suitable C++ program demonstrating its
implementation.
5. Define inheritance and explain its importance in OOP.
6. Describe different types of inheritance (single, multiple, multilevel, hierarchical, hybrid)
with examples.
7. Illustrate the abstract base class in the context of object-oriented programming. Develop a
C++ program that demonstrates the concept of pure virtual functions using both base and
derived classes. Explain how runtime polymorphism is achieved through this approach."
8. Explain the role of constructors and destructors in inheritance and their execution
order in a derived class.
9. Discuss the constraints and challenges of multiple inheritance, including ambiguity
issues and how they are resolved in C++.

Module 4 and module 5


1. Outline the concept of exception handling in C++. Differentiate between various types of
exception handling mechanisms. Illustrate their usage with appropriate C++ examples and
discuss how exception handling enhances program reliability
2. How a function template created? Write a C++ program to find the sum of three integers, float
numbers using function template.
3. How does the use of templates in C++ interact with inheritance?
4. Write a C++ program involving working with a single file. Use ifstream and ofstream classes
to write and read the information to and from a file. Show how a file can be opened and closed.
5. Concept of manipulators in C++ and their role in controlling input and output formatting.
6. Analyze the importance of containers, iterators, and algorithms in the C++ Standard Template
Library (STL). Discuss the advantages and trade-offs of using different STL containers (e.g.,
vector, list, map, set) for various types of data manipulation.
7. Explain the concept of operator overloading for insertion (<<) and extraction (>>) in C++.
8.Create a C++ program to handle array index out-of-bound errors using exception handling.
9.Explain the concept of templates with inheritance. Write a program to create a base class
template and derive a class from it to handle specific data types.
10. Compare and contrast vector, list, stack, and map in STL in terms of storage, access speed,
and typical use cases.
11. Explain the concept of IOstreams in C++. Write a program to demonstrate the use of cin,
cout, cerr, and clog for input and output operations.
12. Write a C++ program to illustrate the use of manipulators like setw, setprecision, setfill, and
fixed for formatting output.

You might also like