| Other C++ General Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Write a String class which has:
1) default constructor
2) copy constructor
3) destructor
4) equality operator similar to strcmp
5) constructor which takes a character array parameter
6) stream << operator | Lehman-Brothers | 1 |
| What is the difference between "overloading" and "overridding"? | | 3 |
| What are the differences between a struct in C and in C++? | Wipro | 4 |
| What happens if an exception is throws from an object's
constructor and from object's destructor? | TCS | 2 |
| What is design pattern? | Samsung | 2 |
| How do you know that your class needs a virtual destructor? | Lucent | 3 |
| Is structure can be inherited? | HP | 3 |
| Give 2 examples of a code optimization? | | 1 |
| How would you stop a class from class from being derived or
inherited?The constructer should not be Private,as object
instantiation should be allowed. | | 14 |
| What happens if an exception is throws from an, object's
constructor and object's destructor? | Wipro | 1 |
| What is Namespace? | Samsung | 1 |
| write the prime no program in c++? | | 4 |
| Write the program for fibonacci in c++? | | 3 |
| The "virtual" specifier in a member function enables which
one of the following?
a) Monmorphism
b) Late binding
c) Metamorphism
d) Solomorphism
e) Inheritance
| Quark | 3 |
| Can inline functions have a recursion? Give the reason? | | 1 |
| How do you test your code?
| Microsoft | 3 |
| What is virtual constructor paradigm? | HP | 3 |
| What is a "RTTI"? | HCL | 5 |
| How long does this loop run:
for(int x=0; x=3; x++)
a) Never
b) Three times
c) Forever
| Quark | 9 |
| tell me about yourself ?i want answer for frehers with
various exasmples? | HCL | 2 |
| |
| For more C++ General Interview Questions Click Here |