OOPS Interview Questions
Questions Answers Views Company eMail

char* ptr = "Rahul"; *ptr++; printf("%s",ptr); What will be the output

Persistent,

9 12501

There are 2 classes defined as below public class A { class B b; } public class B { class A a; } compiler gives error. How to fix it?

Microsoft,

3 6059

where is memory for struct allocated? where is memory for class-object allocated? I replied for struct in stack and for class-object in heap. THen he asked if class has struct member variable what happens.class on heap and what about struct in that class? couldnt ans :( :-?

Infosys, Microsoft,

2 9693

what is runtime polymorphism? For the 5 marks.

3 4653

What are the access specifiers avaible in c++?

4 5931

1. Define a class.

6 5578

2. Give the different notations for the class.\

1576

3. Differentiate verification and validation.

1 3923

4. What do you mean by a prototype? Define analysis prototype

1 3942

Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.

1772

ambiguity regulation of multiple inheritance with example.

1 3471

write a c++ code of diagonal matrix.

2 24041

What is multiple inheritance?

TCS,

9 8042

What is function overloading?,describe it with the example.

5 5281

What is the concept of object oriented program?

6 5856


Post New OOPS Questions

Un-Answered Questions { OOPS }

Why do we use class in oops?

547


What is the difference between procedural programming and oops?

542


What is the fundamental idea of oop?

616


Why multiple inheritance is not allowed?

575


What are the two different types of polymorphism?

662






#include #include #include #include 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.

3230


Which type does string inherit from?

606


Why is oop better than procedural?

595


Why polymorphism is used in oops?

571


What is polymorphism give a real life example?

548


What is destructor oops?

607


What is the significance of classes in oop?

577


What is protected in oop?

592


What is meant by multiple inheritance?

726


What is encapsulation in simple terms?

526