| Other OOPS Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| What is command routing in MFC | GE | 1 |
| Write a macro for swapping integers | | 3 |
| what is the virtual function overhead, and what is it used
for ? i hope i can get and appropriate answers, thanks a lot.... | | 5 |
| Difference between over loading and over ridding?
| CTS | 10 |
| Which is faster post increment or pre increment ? and in
which cases should u use either - to increase speed? | EA-Electronic-Arts | 2 |
| swapping program does not use third variable | | 4 |
| What is the difference between declaration and definition? | | 6 |
| What do you mean by pure virtual functions? | | 4 |
| We have a scale and 7 balls. 1 ball is heavier than all the
rest. How to determine the heaviest ball with only 3
possible weighing attempts?
| IBM | 3 |
| //what is wrong with the programme??
#include<iostream.h>
template <class first>
class dd
{
first i;
public:
void set();
void print();
};
void dd< first>:: set()
{
cin>>i;
}
void dd< first>::print()
{
cout<<"\n"<<i;
}
void main()
{
dd <char>g;
g.set();
g.print();
} | | 1 |
| You have one base class virtual function how will call that
function from derived class? | | 4 |
| to remove the repeated numbers from the given .
i.e..,
if the input is 12233
output should of
123
| | 1 |
| What is public, protected, private? | Satyam | 4 |
| When is an object created and what is its lifetime? | IBM | 1 |
| What will happen when the following code is run:
int x;
while(x<100)
{
cout<<x;
x++;
}
1) The computer will output "0123...99"
2) The computer will output "0123...100"
3) The output is undefined
| | 3 |
| Definition of Object Oriented Programming in single line? | TCS | 14 |
| what is new modifier in C# | HCL | 6 |
| tell about copy constructor | Siemens | 1 |
| what is meant by files? | Infosys | 2 |
| What is the output of the following code:
int v()
{
int m=0;
return m++;
}
int main()
{
cout<<v();
}
1) 1
2) 0
3) Code cannot compile
| | 3 |
| |
| For more OOPS Interview Questions Click Here |