What is Inheritance? |
Inheritance is the process of acquiring the properties of the existing class into the new class.
|
Post/View Answer
Post comment
Cancel
Thanks for your comment.!
Write a comment(Click here) ...
|
What is C++? |
C++ is an object-oriented programming language created by Bjarne Stroustrup in 1985. |
What are the differences between C and C++? |
C++ is a superset of C language. C is a procedural programming language, but C++ supports both procedural and Object Oriented programming. In C++ can use access modifier to restrict access of member function and variable to outside class and user, but in C we can’t do that. |
What are the differences between C++ and Java? |
C++ has pointers, but Java does not support pointer. |
Explain is Object Oriented Programming (OOP)? |
Object-oriented programming is a techniques for managing enormous complexity, achieving reuse of software components, and coupling data with the procedures that work on that data as a single "object"--a self-contained entity. The basic concepts of Object Oriented Programming are given below: |
What is a class in C++? |
Class is a user-defined data type. It can consist of any combination of the variable types and also other class types. |
What is an object? |
An object is an individual instance of a class and also called a class variable. |
|
Define the private, public and protected in C++? |
Private, Public and protected and are three access specifier in C++. Private: All members of a class data and methods are private by default. Private members can be accessed only within methods of the class itself. |
Explain constructor? |
Constructors is special member function of class with the same name as the class and it used to create and initialize Object. |
Explain destructor? |
Destructors always has the name of the class, preceded by a tilde (~) and clean up allocated memory. Destructors take no arguments and have no return value. |
|
What is Default Constructors and Destructors? |
If we don't declare a constructor or a destructor manually, the compiler makes one for you. The default constructor and destructor take no arguments and do nothing. |
What is a copy constructor? |
A copy constructor is the constructor which copies the exact values of one object's member variables into another object. |
Explain the static variable and member function? |
Static variables and member functions belonging to the class rather than to the object. Normal member data is one per object, but static members are one per class and they can be called without having an object of that class.
|
What is a friend function? |
A function which is not a member of the class but still can access all private and protected member data and functions of the class.
|
What is function overriding? |
A derived class creates a function with the same return type and signature (function name, as well as the number and type of its Parameters) as a member function of the base class, but with a new implementation, it is said to be overriding that method.
|
What is polymorphism? |
Polymorphism is the ability to treat many objects of differing but related types without regard to their differences.
|
What is function overloading? |
Function overloading or Function polymorphism is the ability to write more than one function with the same name, but the number or type of the parameters is different.
|