How to call a non virtual function in the derived class by
using base class pointer

Answer Posted / aaa

Typecast the base pointer to derived class pointer type and
then invoke the derived class's function.

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an example of genetic polymorphism?

753


write a C++ program for booking using constructor and destructor.

2133


Which language is not a true object oriented programming language?

750


#include #include #include #include void select(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); select(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void select(char *items, int count) { register int a, b, c; int exchange; char t; for(a = 0; a < count-1; ++a) { exchange = 0; c = a; t = items[ a ]; for(b = a + 1; b < count; ++b) { if(items[ b ] < t) { c = b; t = items[ b ]; exchange = 1; } } if(exchange) { items[ c ] = items[ a ]; items[ a ] = t; } } } design an algorithm for Selection Sort

2167


What is protected in oop?

693






2. Give the different notations for the class.\

1670


write a program to find 2 power of a 5digit number with out using big int and exponent ?

2004


What is difference between multiple inheritance and multilevel inheritance?

716


What is the fundamental idea of oop?

737


What is oops?what is its use in software engineering?

631


Write a program to reverse a string using recursive function?

1879


Whats is abstraction in oops?

702


write string class as your own class in java without using any built-in function

2063


What is polymorphism in oops?

637


Why is polymorphism needed?

694