| Other C++ General Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Can you explain the term "resource acquisition is
initialization?" | | 1 |
| implement stack using stack.h headerfile functions | Subex | 1 |
| How do I open binary files? | | 1 |
| Find the second maximum in an array?
| HCL | 2 |
| What is the Difference between "C structure" and "C++
structure"? | | 4 |
| How can you quickly find the number of elements stored in a
a) static array b) dynamic array ? | Lucent | 3 |
| What is the difference between "overloading" and "overridding"? | | 3 |
| What are the different operators in C++? | HP | 1 |
| Explain the ISA and HASA class relationships. How would you
implement each in a class design? | | 2 |
| What are advantages of C++ when comparing with C? | HP | 3 |
| why the size of an empty class is 1 | | 3 |
| What is Pure Virtual Function? Why and when it is used ? | Lucent | 4 |
| What is the difference between public, private, protected
inheritance? | Wipro | 4 |
| What is problem with Runtime type identification?
| | 1 |
| What is "map" in STL? | | 1 |
| What are the techniques you use for debugging? | Adtran | 1 |
| What are the different types of polymorphism? | | 2 |
| class HasStatic {
static int I;
};
Referring to the sample code above, what is the appropriate
method of defining the member variable "I", and assigning it
the value 10, outside of the class declaration?
a) HasStatic I = 10;
b) int static I = 10;
c) static I(10);
d) static I = 10;
e) int HasStatic::I = 10;
| Quark | 1 |
| What compiler was used?
| Intel | 3 |
| class Foo {
const int x;
protected:
Foo(int f);
~Foo();
};
Foo f;
Referring to the sample code above, why will the class
declaration not compile?
a) The variable x is const.
b) The destructor is protected.
c) The destructor is not public.
d) The constructor is protected.
e) There is no default constructor.
| Quark | 4 |
| |
| For more C++ General Interview Questions Click Here |