-
-
-
What is an object?
Object is a software bundle of variables and related methods. Objects have state and behavior.
-
-
-
-
-
C++ program to expand the given string
C++ program to expand the following string
aa2b4c3d
o/p should be :
aabbccccddd -
What is public, protected, private?
Public, protected and private are three access specifiers in C++. 1. Public data members and member functions are accessible outside the class.2. Protected data members and member functions are only available to derived classes.3. Private data members and member functions can’t be accessed outside the class. However there is an exception can be using friend classes.
-
What do you mean by pure virtual functions?
A pure virtual member function is a member function that the base class forces derived classes to provide. Normally these member functions have no implementation. Pure virtual functions are equated to zero. class Shape { public: virtual void draw() = 0; };
-
-
-
-
Register Relation
Why p++ is faster than p+1?
-
-
C++ without Header files
How we can run our c++ program without header files?
-
What do you mean by inheritance?
Inheritance is the process of creating new classes, called derived classes, from existing classes or base classes. The derived class inherits all the capabilities of the base class, but can add embellishments and refinements of its own.
-
What is encapsulation?
Packaging an object’s variables within its methods is called encapsulation.
-
What do you mean by binding of data and functions?
Encapsulation.
-
C++ Interview Questions
Ans