Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is Pure Virtual Function? Why and when it is used ?

Answer Posted / prajesh gupta (ferozepur, punj

Pure Virtual Functions:
1. "Do nothing Function"
virtual void display() = 0;
2. declared in base class.
3. class containing a pure virtual function does not
declare an object of its own. (That class is known as
ABSTRACT CLASS)

Advantages Of Using:

1. To inherit the properties of the derived class.
2. To create a base pointer required for runtime
poymorphism.
3. To avoid overwriting of member function.

Is This Answer Correct ?    37 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of pointers?

1014


What is abstract keyword in c++?

1021


write a c++ program to create class student having datamember name,Roll_no,age,and branch intilcization all the member using constructor print the all the details on the screen.

2648


Why is c++ still used?

1012


Are c and c++ similar?

997


What is function declaration in c++ with example?

1008


Differentiate between an array and a list?

1142


If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?

1444


What does iomanip mean in c++?

1131


What is pointer to member?

1013


A prime number is a number which is divisible only by itself and 1. Examples of the first few primes are 2, 3, 5, 7, 11. Consider writing a program which can generate prime numbers for you. Your program should read in and set a maximum prime to generate and a minimum number to start with when looking for primes. This program should be able to perform the following tasks: 1. Read the maximum number from user (keyboard input) to look for primes. The program should not return any primes greater than this number. 2. Read the minimum number from user (keyboard input) to look for primes. The program should not return any primes less than this number. 3. Generate and print out every prime number between the maximum prime and minimum number specified by the user.

2136


What is a class template?

1025


What is the size of integer variable?

1012


When does the c++ compiler create temporary variables?

989


What is null pointer and void pointer?

1008