Difference between over loading and over ridding?
Answers were Sorted based on User's Feedback
Answer / vasanth
Method Overloading is the method name looks similar but
return type and method arguement (inside parameter) differs.
Method Overiding is that the method name, arguements and
return type seems similar on both base and derived class.
(Sometimes we will add the additional code to the derived
class method also).
| Is This Answer Correct ? | 1 Yes | 3 No |
When a private constructer is being inherited from one class to another class and when the object is instantiated is the space reserved for this private variable in the memory??
What do you mean by multiple inheritance and multilevel inheritance? Differentiate between them.
can you give the dynamic polymorphism types?
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321
What is the fundamental idea of oop?
#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.
difference between structure and union.
What is destructor example?
char* ptr = "Rahul"; *ptr++; printf("%s",ptr); What will be the output
Finding of the 4 larger (bigger) numbers from the list like{1245,4587,2145,1163,29987,65783.....}
Why do we use oops?
what is new modifier in C#