OOPS Interview Questions
Questions Answers Views Company eMail

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

Infosys, HP, Thyrocare,

23 48326

what is meant by files?

Infosys,

4 5046

is java purely oop Language?

HCL, Infosys, TCS,

49 24753





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

5 5312

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

L&T, Accenture,

4 11807

What is Method overloading?

5 4847

Can we call a base class method without creating instance?

5 11167




In which cases you use override and new base?

2 4411

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

4 4804

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

1 7467

polymorphism means?

BFL,

6 7436

Describe the difference between a Thread and a Process?

10 22512

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

Spinsys,

7 15659

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

1 5646


Post New OOPS Questions






Un-Answered Questions { OOPS }

Give an example where we have to specifically use C programming language and C++ programming language cannot be used?

149


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

585


Objective The objective of this problem is to test the understanding of Object-Oriented Programming (OOP) concepts, in particular, on encapsulation. Problem Description Create a program for managing customer’s bank accounts. A bank customer can do the following operations: 1. Create a new bank account with an initial balance. 2. Deposit money into his/her account. 3. Withdraw money from his/her account. For this operation, you need to output “Transaction successful” if the intended amount of money can be withdrawn, otherwise output “Transaction unsuccessful” and no money will be withdrawn from his/her account. Input The input contains several operations and is terminated by “0”. The operations will be “Create name amount”, “Deposit name amount”, or “Withdraw name amount”, where name is the customer’s name and amount is an integer indicating the amount of money. There will be at most 100 bank accounts and they are all created on the first month when the bank is opening. You may assume that all account holders have unique names and the names consist of only a single word. Output The output contains the transaction result of withdrawal operations and the final balance of all customers after some withdrawal and deposit operations (same order as the input). Sample Input Create Billy 2500 Create Charlie 1000 Create John 100 Withdraw Charlie 500 Deposit John 899 Withdraw Charlie 1000 0

695


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

669


to find out the minimum of two integer number of two different classes using friend function

669


which feature are not hold visual basic of oop?

647


hi all..i want to know oops concepts clearly can any1 explain??

717


write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).

703


How to use CMutex, CSemaphore in VC++ MFC

2694


How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction

674


assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).

684


What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?

316


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

4499


officer say me - i am offered to a smoking , then what can you say

608


This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.

665