| Other C++ General Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| const char *
char * const
What is the differnce between the above two? | TCS | 8 |
| Describe functional overloading? | HP | 3 |
| Can you explain the term "resource acquisition is
initialization?" | | 1 |
| what is the diff b/n c and c++
a. dynamic scoping
b. nested switching
c. declaration of variables in any code block
d. separation of compilation and linking
| Hughes | 1 |
| What happens if an exception is throws from an object's
constructor and from object's destructor? | TCS | 2 |
| What does '\r' and '\b' mean? Please explain with example.
| | 2 |
| Explain the ISA and HASA class relationships. How would you
implement each in a class design? | | 2 |
| template<class T, class X> class Obj {
T my_t;
X my_x;
public:
Obj(T t, X x) : my_t(t), my_x(x) { }
};
Referring to the sample code above, which one of the
following is a valid conversion operator for the type T?
a) T operator T () { return my_t; }
b) T operator(T) const { return my_t; }
c) operator(T) { return my_t; }
d) T operator T (const Obj &obj) { return obj.my_t; }
e) operator T () const { return my_t; }
| Quark | 1 |
| What is the Maximum Size that an Array can hold? | Satyam | 31 |
| What is size of null class? | HP | 3 |
| What is Memory Alignment? | TCS | 1 |
| What are the differences between a struct in C and in C++? | Wipro | 4 |
| What are Binay tress and B trees? Diff between them? | CTS | 3 |
| Can inline functions have a recursion? Give the reason? | | 1 |
| Memory is not a constraint. In a single iteration(NOTE: you
can't go back), how will you find out the 10th last
node/item in a linked list. | Goldman-Sachs | 8 |
| Which of the Standard C++ casts can be used to perform a
?safe? downcast:
a) reinterpret_cast
b) dynamic_cast
c) static_cast
d) const_cast
| Quark | 1 |
| What is problem with Runtime type identification?
| | 1 |
| What is Virtual Inheritance? | Wipro | 2 |
| What are the types of STL containers? | | 1 |
| What is object slicing and how can we prevent it? | Tech-Mahindra | 2 |
| |
| For more C++ General Interview Questions Click Here |