OOPS Interview Questions
Questions Answers Views Company eMail

write a c++ code to overload + and - for a stack class such that + provides push and - provides pop operation

College School Exams Tests, HCL, IBM, TCS,

1 5328

write knight tour problem which is present in datastructure

2154

write string class as your own class in java without using any built-in function

1965

how does a main() in C++ is different from main() in C?

7 24727

How do you make derived class as an abstract class?

Convergys, TCS,

1 4437

Write a program to find out the number of palindromes in a sentence.

TCS,

1 3853

what is static?

4 4526

The IT giant Tirnop has recently crossed a head count of 150000 and earnings of $7 billion. As one of the forerunners in the technology front, Tirnop continues to lead the way in products and services in India. At Tirnop, all programmers are equal in every respect. They receive identical salaries and also write code at the same rate. Suppose 14 such programmers take 14 minutes to write 14 lines of code in total. How long will in take 5 programmers to write 5 lines of code in total ?

TCS,

6 9063

Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.

1 3986

write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.

Wipro,

1777

what is overloading

MindCracker,

3 4109

what is the diffrence between c# and c++

5 6675

How compiler selects(internally) required overridden function in inheritance?

CSC, Infinite Computer Solutions,

2 5400

They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1399

There are 2 empty jars of 5 and 3 liters capacity. And a river is flowing besides. I want to measure 4 liters of wanter using these 2 jars. How do you do this?

2 3490


Post New OOPS Questions

Un-Answered Questions { OOPS }

What is the example of polymorphism?

550


What is coupling in oop?

583


Is data hiding and abstraction same?

561


Can we have inheritance without polymorphism?

601


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

3236






• What are the desirable attributes for memory managment?

1715


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

6131


what are the realtime excercises in C++?

2325


What are the three parts of a simple empty class?

1446


How to hide the base class functionality in Inheritance?

628


Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.

2565


Write a program to reverse a string using recursive function?

1782


What is encapsulation selenium?

549


What are the 4 main oop principles?

667


Which is not an object oriented programming language?

530