OOPS Interview Questions
Questions Answers Views Company eMail

WILL I GET A guaranteed JOB AFTER DOING bsc()IT) and GNIIT from an NIIT CENTRE??

NIIT, MIT, Biocon,

21 22259

In multilevel inheritance constructors will be executed from the .... class to ... class

TCS, ABCO,

2 10167

write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory

1614




You attempt to query the data base with this command: SELECT name, salary FROM employee WHERE salary=(SELECT salary FROM employee WHERE last name='Wagner' OR dept no=233) Choose most appropriate option from the following: 1)Sub-queries are not allowed in the where clause. 2)a multiple row sub-query used with a single row comparison operator. 3)a single row query is used with a multiple row comparison operator.

Zycus Infotech,

10 8740

write a function that takes an integer array as an input and finds the largest number in the array. You can not sort array or use any API or searching needs?

IBMS, Zycus Infotech,

2 9430

why c++ is a highlevel language

Satyam, Tech Mahindra,

3 3216

Whatis the difference between oop and object based language

3 3131

whats the difference between c and c++

Syntel,

7 5190




Program to check whether a word is the first word of the sentence.

1 1701

Program to check whether a word is in all capital letters

1 3114

Program to check whether a word starts with a capital letter or not.

Infosys,

1 2858

Program to open a file with First argument

TCS,

1 1773

Program to read a comment string

IBM,

1 1628

can we make a class static without using static keyword?

Aspire,

5 5621

what is the difference between class and structure in C++?

Aspire,

9 9029


Post New OOPS Questions






Un-Answered Questions { OOPS }

There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.

539


How to Increment the value of the empid E001 for each and every employee by using the programe?

770


Templates mean

627


• What are the desirable attributes for memory managment?

623


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

343


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

673


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

728


when to use 'mutable' keyword and when to use 'const cast' in c++

676


what type of question are asked in thoughtworks pair programming round ?

196


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.

1043


Give two or more real cenario of virtual function and vertual object

870


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

787


which feature are not hold visual basic of oop?

688


What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }

997


i got a backdoor offer in process global,Bangalore..Can i work with it?

1300