File system: –

File system: - The fstream is a class in C++ that supports read from the file, create the file, write onto the file, open the file, close the file etc. Ofstream: - ofstream is a class which is used to write the text onto the file. Ifstream: - ifstream is a class which is used … Continue reading File system: –


Storage class: –

Storage class: - It is a class which is use to improve the efficiency of program. There are four types of storage class. Automatic (auto) Register (register) External (extern) Static (static) There are four parameters have been use for all four types of storage class. Lifetime Scope Initial value Memory Automatic storage class: - All … Continue reading Storage class: –

Exception handling: –

Exception handling: - It is a technique to handle the exception which is accord from a location of program and transfer the control of compiler to the exception handler routine (catch block). Exception: - It is a run time error which is found during execution of program (Not at compilation time) Ex: - #include<iostream.h> #include<conio.h> … Continue reading Exception handling: –

Template: –

Template: - It is a technique that allows a function or a class to work with different-different data types. Template data type inside function is used to process all kinds of data from different-different types. There are two types of template. (1) Class Template, (2) Function Template. Syntax of class template: - template <class T> … Continue reading Template: –

Virtual base class: –

Virtual base class: - The ambiguity problem with multipath inheritance is solved by making a base class as virtual. When we make a base class as virtual then compiler will avoid the duplication of members of base class into the child class. Function overriding: - It is only supported by inheritance. The member function from … Continue reading Virtual base class: –

Type of inheritance: –

Type of inheritance: - The following are types of inheritance. Single inheritance Multiple inheritance Multi-level inheritance Hybrid inheritance Hierarchical inheritance Multi-path inheritance Single inheritance: - When one derived class is derived from one base class then such type of inheritance is called as inheritance. Multiple Inheritance: - When one child class has more than one … Continue reading Type of inheritance: –

Inheritance: –

Inheritance: - It a technique to create a new class from existing class. Existing class = base class, supper class, parent class etc. New class = derived class, sub class, child class etc. Syntax to create new class –                 Class New_Class_Name:Access_Specifier Existing_Class_Name                                 {                                 _ _ _ _ _;                                 _ _ _ … Continue reading Inheritance: –

Operator overloading: –

Operator overloading: - It’s a technique to overload the operator when applied on objects. Whenever the operator will be applied on objects then immediately compiler searches operator function. Operator function: - It is a function were the operator will be defined with operator keyword. Inside this function operator will be applied over member variables. Operator … Continue reading Operator overloading: –

Order of execution of constructor and destructor: –

Order of execution of constructor and destructor: - The order of execution of constructor goes from low to high. Where order of execution of destructor goes from high to low. Explicit call to constructor and destructor: - We have two technique to explicit call to the constructor. Syntax: - (1) Without object name                 Class_Name(); … Continue reading Order of execution of constructor and destructor: –

Destructor: –

Destructor: - It is also a special member function just like constructor. The purpose of it is to destroy the memory allocation of an object. When the object goes out of the scope when the object are created. There are following some rule – It must also have same name as of its class name … Continue reading Destructor: –