Tell me about virtual function



Tell me about virtual function..

Answer / hrpynux@gmail.com

A C++ virtual function is a member function in the base class that you redefine in a derived class. It is declared using the virtual keyword. It is used to tell the compiler to perform dynamic linkage or late binding on the function. ... A 'virtual' is a keyword preceding the normal declaration of a function.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ Interview Questions

Briefly explain various access specifiers in C++.

0 Answers   Amdocs,


What is the difference between public, private, and protected inheritance?

0 Answers   Amazon,


What is wrong with this statement? std::auto_ptr ptr(new char[10]);

0 Answers   Amazon,


Write a program to display the following output using a single cout statement Maths=90 Physics=77 Chemistry = 69

2 Answers  


What are "pure virtual" functions?

0 Answers   Adobe, Alter, iNautix,






What is the purpose of a constructor? Destructor?

0 Answers   Amazon,


what is friend function in C++?

0 Answers   TCS,


Write a program to input an integer from the keyboard and display on the screen “WELL DONE” that many times.

1 Answers  


What does malloc return in C and C++?

0 Answers   Alter,


what is a pragma in C++?

0 Answers   Aspire,


Identify the error in the following program. include<iostream> using namespace std; void main() { int num[]={1,2,3,4,5,6}; num[1]==[1]num ? cout<<"Success" : cout<<"Error"; }

1 Answers  


Write a C++ Program to find Addition of Two Numbers.

1 Answers  


Categories