How compiler selects(internally) required overridden
function in inheritance?
Answers were Sorted based on User's Feedback
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 |
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 |
What is a mixin class?
wht is major diff b/w c and c++?
Can bst contain duplicates?
why overriding?
Can we create object of class with private constructor?
How Do you Code Composition and Aggregation in C++ ?
#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.
what is the need of abstraction? what is abstraction?what is the abstraction for stack?
what is single inheritance?
What is polymorphism ? Explain with examples
JAVA is FULLY OBJECT ORIENTED PROGRAMING LANGUAGE?
what is function overloading..?