-Our Timings :Mon - Sat, 9:00am - 9:00pm Call +91 - 9915 00 5347, 9988 36 5347







C++ Programming Interview Questions


OOPS stand for "Object Oriented Programming System."

Class is a blue print which reflects the entities attributes and actions. Technically defining a class is designing an user defined data type.

An instance of the class is called as object.

The process of binding the data and the functions acting on the data together in an entity (class) called as encapsulation.

Abstraction refers to hiding the internal implementation and exhibiting only the necessary details.

Inheritance is the process of acquiring the properties of the existing class into the new class. The existing class is called as base/parent class and the inherited class is called as derived/child class.

Single, Multilevel, Multiple, Hierarchical and Hybrid.

A function prefixed with the keyword inline before the function definition is called as inline function. The inline functions are faster in execution when compared to normal functions as the compiler treats inline functions as macros.

Storage class specifies the life or scope of symbols such as variable or functions.

The following are storage classes supported in C++

auto, static, extern, register and mutable

A constant class object’s member variable can be altered by declaring it using mutable storage class specifier. Applicable only for non-static and non-constant member variable of the class.

Shallow copy does memory dumping bit-by-bit from one object to another. Deep copy is copy field by field from object to another. Deep copy is achieved using copy constructor and or overloading assignment operator.

A virtual function with no function body and assigned with a value zero is called as pure virtual function.

A class with at least one pure virtual function is called as abstract class. We cannot instantiate an abstract class.

A reference variable is an alias name for the existing variable. Which mean both the variable name and reference variable point to the same memory location. Therefore updation on the original variable can be achieved using reference variable too.

A static variable does exit though the objects for the respective class are not created. Static member variable share a common memory across all the objects created for the respective class. A static member variable can be referred using the class name itself.

A static member function can be invoked using the class name as it exits before class objects comes into existence. It can access only static members of the class.

bool, is the new primitive data type introduced in C++ language.