what is virtual function?
Answer Posted / dev malhotra
virtual function is defined as virtual is a keyword which is used when one function or method is used in both base class and drived class at a time then, during compile time compiler cannot distinguish that which one compile or run first.
then to distinguish that problem the programmer use special keyword in base class or in derived class that is known as "VIRTUAL" keyword.
Due to this keyword the compiler always compiles the assigned virtual keyword method or function and this is called as virtual function.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what is different between oops and c++
hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.
#include
Why is there no multiple inheritance?
given a set based questions and 5 questions based on it next data sufficiciency questions 2 and 2/3 english sentence completion with options very easy and 2 synononmys paragraph with 10 questions 10 minutes replace =,-,*,% with -,%,+,* type questions 5 3 questions lik following itssickhere itssickthere itssickhere istsickhere which is nt alike the others very easy
just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.
Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.
What is polymorphism in oop example?
What are the 5 oop principles?
What are two types of polymorphism?
Can abstract class have normal methods?
which feature are not hold visual basic of oop?
What is abstraction with example?
is there any choice in opting subjects like 4 out of 7
Can destructor be overloaded?