How compiler selects(internally) required overridden
function in inheritance?

Answers were Sorted based on User's Feedback



How compiler selects(internally) required overridden function in inheritance?..

Answer / deepthi

By using virtual tables,

when Compiler views virtual in a class declaration then for
each class it creats one virtual table

Is This Answer Correct ?    2 Yes 0 No

How compiler selects(internally) required overridden function in inheritance?..

Answer / deepthi

By using virtual tables,

when Compiler views virtual in a class declaration then for
each class it creats one virtual table

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More OOPS Interview Questions

What is a mixin class?

4 Answers  


wht is major diff b/w c and c++?

10 Answers  


Can bst contain duplicates?

0 Answers  


why overriding?

3 Answers  


Can we create object of class with private constructor?

5 Answers  


How Do you Code Composition and Aggregation in C++ ?

3 Answers   IBM, NET,


#include <stdio.h> #include <alloc.h> #include <stdlib.h> #include <conio.h> void insert(struct btreenode **, int); void inorder(struct btreenode *); struct btreenode { struct btreenode *leftchild; struct btreenode *rightchild; int data; }; main() { struct btreenode *bt; bt=(struct btreenode *)NULL; int req,i=1,num; clrscr(); printf("Enter number of nodes"); scanf("%d",&req); while(i<=req) { printf("Enter element"); scanf("%d",&num); insert(&bt,num); i++; } inorder(bt); } void insert(struct btreenode **sr, int num) { if(*sr==NULL) { *sr=(struct btreenode *)malloc (sizeof(struct btreenode)); (*sr)->leftchild=(struct btreenode *)NULL; (*sr)->rightchild=(struct btreenode *)NULL; (*sr)->data=num; return; } else { if(num < (*sr)->data) insert(&(*sr)->leftchild,num); else insert(&(*sr)->rightchild,num); } return; } void inorder(struct btreenode *sr) { if(sr!=(struct btreenode *)NULL) { inorder(sr->leftchild); printf("\n %d",sr->data); inorder(sr->rightchild); } else return; } please Modify the given program and add two methods for post order and pre order traversals.

0 Answers  


what is the need of abstraction? what is abstraction?what is the abstraction for stack?

8 Answers   CTS, Verizon,


what is single inheritance?

18 Answers   IBM,


What is polymorphism ? Explain with examples

8 Answers   Ness Technologies,


JAVA is FULLY OBJECT ORIENTED PROGRAMING LANGUAGE?

3 Answers  


what is function overloading..?

4 Answers  


Categories