OOPS Interview Questions
Questions Answers Views Company eMail

What is OOPS and How it is different from Procedural Programming ?

Infosys, HP, Thyrocare,

23 50155

what is meant by files?

Infosys,

4 5385

is java purely oop Language?

HCL, Infosys, TCS,

49 26572





What is Object and Class? What are the differences between them?

5 5591

What is Inheritance, Multiple Inheritance, Shared and Repeatable Inheritance?

L&T, Accenture,

4 12721

What is Method overloading?

5 5154

Can we call a base class method without creating instance?

5 11944




In which cases you use override and new base?

2 4589

You have one base class virtual function how will call that function from derived class?

4 5004

In which Scenario you will go for Interface or Abstract Class?

1 7678

polymorphism means?

BFL,

6 7726

Describe the difference between a Thread and a Process?

10 23064

Describe what an Interface is and how it?s different from a Class.

Spinsys,

7 16079

What is the difference between XML Web Services using ASMX and .NET Remoting using SOAP?

1 5961


Post New OOPS Questions






Un-Answered Questions { OOPS }

how to get the oracle certification? send me the answer

659


write a program to find 2^n+1 ?

607


Question In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest. Question Submitted By :: Sunil Kumar I also faced this Question!! Rank Answer Posted By Re: In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest. Answer # 1 use copy constructors 0 Shanthila There is something to be taken care in destructor, in copy constructor, suppose the memory is assigned to the embedded member object pointer with the parameter passed value, but if some other objects of different class also are pointing to this memory, then if some one deletes the object then this class member pointer object will become dangling, or if the object is not deleted properly then there will be memory leak. Please suggest the design change required to handle or avoid this situation

761


design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)

4794


write a programe to calculate the simple intrest and compund intrest using by function overlading

724


what is difference between class template and template class?

1228


what are the ways in which a constructors can be called?

635


Get me a number puzzle game-program

719


#include #include #include #include void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort

934


i=20;k=0; for(j=1;k-i;k+=j<10?4:3) { cout<

367


2. Give the different notations for the class.\

650


What is interface? When and where is it used?

708


Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?

3313


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

844


hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.

694