What is this interview room ?
Is it a class or an object.
Answers were Sorted based on User's Feedback
Answer / vinoth
This depend on the situation. It can be either a class or object
Is This Answer Correct ? | 14 Yes | 3 No |
Answer / jenish
Interview is specific about this interview room. and It should be classified as object. Class does provide template where as object is actual data appropriate for that template and that interview room is itself object.
Is This Answer Correct ? | 3 Yes | 0 No |
What is multilevel inheritance?
What do you mean by Encapsulation?
When will a constructor executed?
#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 DIFFERENCE BETWEEN ABSTRUCTION AND ENCAPSULATION? PLEASE EXPLAIN IT.
write a program which best describes polymorphism in real world?
2 Answers CTS, Infosys, NexGen,
what is different between oops and c++
Why do while loop is used?
How do you make derived class as an abstract class?
What is and I oop mean?
program for insertion ,deletion,sorting in double link list
Which language is pure oop?