Complete RGPV exam-oriented page covering Object and Classes, Scope Resolution Operator, Constructors and Destructors, Friend Functions, Inheritance, Polymorphism, Function Overloading, Operator Overloading, Types of Inheritance, Virtual Functions and Introduction to Data Structures.
Basic Computer Engineering Unit 3 important topics
Easy revision notes for RGPV exam
Object is a real-world entity that has data and behavior. Example: Student is an object having name, roll number and marks.
Class is a blueprint or template for creating objects. It contains data members and member functions.
Scope Resolution Operator is written as :: in C++. It is used to define member functions outside the class and access global variables.
Constructor is a special member function which is automatically called when object is created. It has the same name as class and no return type.
Destructor is used to destroy objects and release memory. It has same name as class but starts with tilde symbol ~.
Friend function is not a member of class but can access private and protected members of class. It is declared using friend keyword.
Inheritance is an OOP concept where one class acquires properties of another class. It improves code reusability.
Polymorphism means one name, many forms. It allows same function or operator to behave differently in different situations.
Function overloading means creating multiple functions with same name but different arguments. It is an example of compile-time polymorphism.
Operator overloading means giving special meaning to operators for user-defined data types. Example: using + operator to add two objects.
Virtual function is declared using virtual keyword. It supports runtime polymorphism and function overriding.
Data Structure is a way of organizing and storing data efficiently. Examples are array, stack, queue, linked list, tree and graph.
Very important program for exams
#include <iostream>
using namespace std;
class Student
{
int roll;
string name;
public:
void getData()
{
cout << "Enter roll and name: ";
cin >> roll >> name;
}
void showData()
{
cout << "Roll: " << roll << endl;
cout << "Name: " << name << endl;
}
};
int main()
{
Student s1;
s1.getData();
s1.showData();
return 0;
}
Commonly asked C++ program
#include <iostream>
using namespace std;
class Demo
{
public:
Demo()
{
cout << "Constructor called" << endl;
}
~Demo()
{
cout << "Destructor called" << endl;
}
};
int main()
{
Demo d;
return 0;
}
Must remember points for exam
High chance RGPV exam questions
Repeated and high-priority RGPV exam topics
| Topic | Repeated Questions | Frequency | Priority |
|---|---|---|---|
| Class and Object | Definition, syntax, example program and difference | Very High | ★★★★★ |
| Constructor & Destructor | Types, features, syntax and program | Very High | ★★★★★ |
| Inheritance | Inheritance concept and types with diagram | Very High | ★★★★★ |
| Polymorphism | Compile-time and runtime polymorphism | Very High | ★★★★★ |
| Function Overloading | Same function name with different parameters | High | ★★★★ |
| Operator Overloading | Operator keyword, syntax and example | High | ★★★★ |
| Virtual Function | Runtime polymorphism and base class pointer | High | ★★★★ |
| Friend Function | Access private members using friend keyword | Medium | ★★★ |
| Data Structures | Definition, need and types of data structures | High | ★★★★ |
Keep these PDFs in the same folder as this HTML file
Common student doubts
Class and object, constructors, destructors, inheritance, polymorphism, overloading and virtual functions are most important.
Class and object program, constructor-destructor program, inheritance program, function overloading and operator overloading programs should be prepared.
Class vs Object, Constructor vs Destructor, Function Overloading vs Overriding and Compile-time vs Runtime Polymorphism are very important.
Yes, Introduction to Data Structures is important. Prepare definition, need, types, linear and non-linear data structures.