C++ Questions

Q:

What are storage qualifiers in C++ ?

Answer

ConstKeyword indicates that memory once initialized, should not be altered by a program.
Volatile keyword indicates that the value in the memory location can be altered even though nothing in the program.
Mutable keyword indicates that particular member of a structure or class can be altered even if a particular structure variable, class, or class member function is constant.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

0 2425
Q:

What is the difference between class and structure?

Answer

Structure: Initially (in C) a structure was used to bundle different type of data types together to perform a particular functionality. But C++ extended the structure to contain functions also. The major difference is that all declarations inside a structure are by default public.
Class: Class is a successor of Structure. By default all the members inside the class are private.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

0 2277
Q:

What is dynamic binding?

Answer


Dynamic binding (also known as late binding) means that the code associated with a given procedure call is not known until the time of the call at run time.It is associated with polymorphism and inheritance.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

0 2134
Q:

What do you mean by early binding?

Answer

Early binding refers to the events that occur at compile time. Early binding occurs when all information needed to call a function is known at compile time. Examples of early binding include normal function calls, overloaded function calls, and overloaded operators. The advantage of early binding is efficiency.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

0 2072
Q:

What do you mean by reference variable in c++?

Answer

A reference variable provides an alias to a previously defined variable.
Data -type & reference-name = variable name

Report Error

View answer Workspace Report Error Discuss

Subject: C++

0 2028
Q:

List the advantages of inheritance

Answer

- Inheritence permits code reusability. 


- Reusability saves time in program development. 


- It encourages the reuse of proven and debugged high-quality software which reduces the problems after a system becomes functional.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

0 2008
Q:

What do you mean by multiple inheritance in C++ ?

Answer

Multiple inheritance is a feature in C++ by which one class can be of different types. Say class teaching Assistant is inherited from two classes say teacher and Student.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

0 1994
Q:

What are the basic concepts of object oriented programming?

Answer

It is necessary to understand some of the concepts used extensively in object oriented programming.These include


Objects
Classes
Data abstraction and encapsulation
Inheritance
Polymorphism
Dynamic Binding
Message passing

Report Error

View answer Workspace Report Error Discuss

Subject: C++

0 1933