what is virtual function?

Answer Posted / ravi

Virtual function is a member function of a class.whose
functionality can be overridden in is derived class.

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash

1696


What is the problem with multiple inheritance?

582


Can a varargs method be overloaded?

617


What is the fundamental idea of oop?

634


What is polymorphism and types?

596






What is the renewal class?

2161


What is a function in oop?

629


How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction

1652


2. Give the different notations for the class.\

1586


What is the purpose of enum?

579


Why oops is important?

605


What do you mean by Encapsulation?

640


How many human genes are polymorphic?

570


what type of question are asked in thoughtworks pair programming round ?

1758


Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.

693