Skip to content

AdityaPandey-DEV/Cpp-Oops-Question

Repository files navigation

C++ OOPS End Term Exam Questions - B.Tech 3rd Sem (Graphic Era Hill University)

Welcome to the repository for the End Term Exam Questions on C++ Object-Oriented Programming (OOPs) for B.Tech 3rd Semester students of Graphic Era Hill University.

This repository contains a collection of exam questions, topics, and reference materials to help you prepare for the C++ OOPs exam. The questions are designed to test your understanding of key concepts such as classes, inheritance, polymorphism, abstraction, encapsulation, and other fundamental OOP principles in C++.

Table of Contents

Overview

This repository is intended for students enrolled in the B.Tech 3rd Semester program at Graphic Era Hill University. It includes a series of exam questions focused on Object-Oriented Programming in C++. These questions cover the essential topics of the C++ OOPs paradigm and are aimed at helping students prepare for their final exam.

Exam Topics

The exam will cover the following topics:

  1. Introduction to C++: Basic syntax, data types, operators, and flow control.
  2. Classes and Objects: Definition, instantiation, constructors, destructors.
  3. Encapsulation: Access specifiers, data hiding.
  4. Inheritance: Types of inheritance, access control in inheritance, base class and derived class.
  5. Polymorphism: Function overloading, operator overloading, virtual functions, runtime polymorphism.
  6. Abstraction: Abstract classes, pure virtual functions.
  7. Friend Functions: Definition and usage.
  8. STL (Standard Template Library): Vectors, lists, stacks, queues, iterators.
  9. Exception Handling: try-catch blocks, exceptions in functions.
  10. File Handling in C++: Reading and writing to files, file stream handling.

Questions

Here are some sample exam questions that cover the main topics of the course:

  1. Write a C++ program to define a class representing a bank account. Include functions for depositing and withdrawing money, as well as checking the balance.

  2. Explain and demonstrate function overloading in C++ with an example.

  3. Create a C++ program that demonstrates inheritance with at least one base class and two derived classes. Show how to use member functions of the base class in the derived class.

  4. Write a C++ program to implement polymorphism by overloading an operator to add two objects of a class.

  5. Create an abstract class in C++ and implement it in a derived class. Explain the use of pure virtual functions.

  6. Demonstrate the use of exception handling in C++ by writing a program that handles divide-by-zero errors.

  7. Write a C++ program to open a text file, read its contents, and display them on the screen. Handle any potential errors during file reading.

How to Use

  1. Clone this repository to your local machine using the following command:

  2. Open the exam question files located in the questions/ directory. Each question will be accompanied by a detailed explanation and code template.

  3. Practice writing the programs on your local machine and review the explanations provided in each question.

  4. If you have any doubts or require further clarification on any topic, feel free to open an issue or refer to the provided resources.

Contributing

If you would like to contribute to this repository, feel free to submit a pull request with any improvements, corrections, or additional exam questions. Please ensure that your code is well-commented and easy to understand.

How to Contribute:

  1. Fork this repository.
  2. Create a new branch for your changes.
  3. Commit your changes.
  4. Push your changes to your fork.
  5. Open a pull request with a detailed description of the changes.

License

This repository is open-source and available under the MIT License. See the LICENSE file for more details.


Good luck with your studies and exam preparation! If you have any questions, don't hesitate to ask.

About

This repository contains C++ Object-Oriented Programming (OOPs) exam questions and reference materials for B.Tech 3rd Semester students at Graphic Era Hill University. It covers key concepts such as classes, inheritance, and polymorphism to aid in exam preparation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages