what is virtual function?
Answer Posted / manav sharma
It allows one to write generalized code that works with the
base class pointer which can dynamically point to the
derieved class objects. Virtual function allows you to
implement runtime polymorphism. It allows the function call
to be binded with function definition as late as runtime.
Also read: concept of VPTR and VTABLE from Thinking in C++
| Is This Answer Correct ? | 56 Yes | 8 No |
Post New Answer View All Answers
What is encapsulation in ict?
This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.
• What are the desirable attributes for memory managment?
When not to use object oriented programming?
What is polymorphism what are the different types of polymorphism?
i got a backdoor offer in process global,Bangalore..Can i work with it?
What is oops in simple words?
What is difference between oop and pop?
which feature are not hold visual basic of oop?
Which is better struts or spring?
What is inheritance in simple words?
What is the real time example of inheritance?
What are the 5 oop principles?
Why is static class not inherited?
What are functions in oop?