Q-1 What is C++?
Basically C++ is a super set of C language.C++ Is a Object Oriented programming language(OOP).
C++ language support button to To approach with Header file.
We can define c++ in 5 step c++ is object - oriented programming language.
It is subset of c.
C++= c + oops - It is an extended version of c.
It was developed by BJARNE STROUSTRUP at AT & T BELL LAB USA in 1980.
C++ language support button to To approach with Header file.
We can define c++ in 5 step c++ is object - oriented programming language.
It is subset of c.
C++= c + oops - It is an extended version of c.
It was developed by BJARNE STROUSTRUP at AT & T BELL LAB USA in 1980.
Q-2 What are the basic concepts of object oriented programming?
The basic Concept of Object Oriented Programming Languages are on based on Object.
But here functions(methods) are fixed but Objects are moving function to function within a program.
Instead of that it uses the different features including
classes,
data encaptulation and abstaction ,
inheritance,
Polymorphism,
dynamic binding etc.
But here functions(methods) are fixed but Objects are moving function to function within a program.
Instead of that it uses the different features including
classes,
data encaptulation and abstaction ,
inheritance,
Polymorphism,
dynamic binding etc.
Q-3 Define polymorphism?
polymorphism means more than one forms.
Polymorphism means one name, multiple forms.
It allows us to have more than one function with the same name in a program.
It allows us to have overloading of operators so that an operation can exhibit different behaviours in different instances.
Polymorphism means one name, multiple forms.
It allows us to have more than one function with the same name in a program.
It allows us to have overloading of operators so that an operation can exhibit different behaviours in different instances.
Q-4 Define inheritance?
Forming new class from an existing class that is called Inheritance.
The mechanism of deriving a new class (derived) from an old class (base class) is called inheritance.
It allows the extension and reuse of existing code without having to rewrite the code from scratch.
Inheritance is the process by which objects of one class acquire properties of objects of another class.
The mechanism of deriving a new class (derived) from an old class (base class) is called inheritance.
It allows the extension and reuse of existing code without having to rewrite the code from scratch.
Inheritance is the process by which objects of one class acquire properties of objects of another class.
Q-5 What is message passing?
Message passing is the process which receives the information from one object to another.
for example a bank manager receives the information to the customer for bank balance.
An object oriented program consists of a set of objects that communicate with each other.
Message passing involves specifying the name of the object, the name of the function and the information to be sent.
for example a bank manager receives the information to the customer for bank balance.
An object oriented program consists of a set of objects that communicate with each other.
Message passing involves specifying the name of the object, the name of the function and the information to be sent.
Q-6 What are tokens in C++?
The smallest individual units of a program is known as tokens. c++ has the following tokens :
Keywords
Identifiers
Constants
Strings
Operators
Keywords
Identifiers
Constants
Strings
Operators
Q-7 Define Constructors?
A constructor is a special member function of a class that is having same name as that of class.
It does not have a return type and it is automatically invoked on the time of object creation.
Constructors are mainly use to initialize the data members of an object. If we do not define a constructor in our program even then it is provided by the language compiler by default.
There is three types of constructor
Default Constructor
Parameterized Constructor
Copy Constructor.
It does not have a return type and it is automatically invoked on the time of object creation.
Constructors are mainly use to initialize the data members of an object. If we do not define a constructor in our program even then it is provided by the language compiler by default.
There is three types of constructor
Default Constructor
Parameterized Constructor
Copy Constructor.
Q-8 Define destuctors?
A destructor is a special member function of a class that is executed whenever an object of it\'s class goes out of scope or whenever the delete expression is applied to a pointer to the object of that class.
A destructor will have exact same name as the class prefixed with a tilde (~) and it can neither return a value nor can it take any parameters.
Destructor can be very useful for releasing resources before coming out of the program like closing files, releasing memories etc.
Like a constructor , the destructor is a member function whose name is the same as the class name but is precided by a tilde.
A destructor will have exact same name as the class prefixed with a tilde (~) and it can neither return a value nor can it take any parameters.
Destructor can be very useful for releasing resources before coming out of the program like closing files, releasing memories etc.
Like a constructor , the destructor is a member function whose name is the same as the class name but is precided by a tilde.
Q-9 what is the difference between c & c++?
C++ ia an object oriented programing but C is a procedure oriented programing.
C is super set of C++.
C can’t suport inheritance, function overloading, method overloading etc. but c++ can do this.
In c program the main function could not return a value but in the c++ the main function shuld return a value.
C is super set of C++.
C can’t suport inheritance, function overloading, method overloading etc. but c++ can do this.
In c program the main function could not return a value but in the c++ the main function shuld return a value.
Q-10 What is copy constructor?
The copy constructor is a constructor which creates an object by initializing it with an object of the same class, which has been created previously.
The copy constructor is used to: Initialize one object from another of the same type.
Copy an object to pass it as an argument to a function.
Copy an object to return it from a function. If a copy constructor is not defined in a class, the compiler itself defines one.If the class has pointer variables and has some dynamic memory allocations, then it is a must to have a copy constructor.
The copy constructor is used to: Initialize one object from another of the same type.
Copy an object to pass it as an argument to a function.
Copy an object to return it from a function. If a copy constructor is not defined in a class, the compiler itself defines one.If the class has pointer variables and has some dynamic memory allocations, then it is a must to have a copy constructor.
Q-11 What is default constructor?
A default constructor is a constructor that either has no parameters, or if it has parameters, all the parameters have default values.
Q-12 What is a scope resolution operator?
The scope resolution operator permits a program to reference an identifier in the global scope that has been hidden by another identifier with the same name in the local scope.

Hello Anitha,
ReplyDeleteThank you SO MUCH! I was actually holding my breath as I followed these directions. It worked beautifully!
It's great to utilize the power of internet with the available free blogs.
Appreciate your effort for making such useful blogs and helping the community.
Regards,
Kevin