| Other C++ General Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| What is a constructor initializer list and when we use
constructor initializer list?
| TCS | 2 |
| string somestring ;
Which of the following choices will convert a standard C++
string object "somestring" to a C string?
a) Copy.somestring () ;
b) somestring.c_str ()
c) &somestring [1]
d) std::cstring (somestring)
e) (char *) somestring
| Quark | 1 |
| What are the different operators in C++? | HP | 1 |
| How Virtual functions call up is maintained? | | 2 |
| How do you know that your class needs a virtual destructor? | Lucent | 3 |
| How many bit combinations are there in a byte? | Intel | 7 |
| What about Virtual Destructor?
| Virtusa | 1 |
| What is the output of printf("%d")? | HCL | 25 |
| Difference between Top down and bottom up approaches for a
given project ? | HP | 1 |
| class professor {};
class teacher : public virtual professor {};
class researcher : public virtual professor {};
class myprofessor : public teacher, public researcher {};
Referring to the sample code above, if an object of class
"myprofessor" were created, how many instances of professor
will it contain?
a) 0
b) 1
c) 2
d) 3
e) 4
| Quark | 1 |
| Write a function which takes a character array as input and
reverses it in place. | Lehman-Brothers | 2 |
| Write a program to reverse a linked list? | Catalytic-Software | 2 |
| how to swap two strings without using any third variable ? | | 3 |
| what is pulse code modulation?
| Wipro | 1 |
| Difference between Operator overloading and Functional
overloading? | HP | 3 |
| Can you explain the term "resource acquisition is
initialization?" | | 1 |
| Implement strcmp | Citadel | 2 |
| What is the difference between = and == in C? | Intel | 8 |
| Why is it difficult to store linked list in an array? | Lucent | 2 |
| Explain "passing by value", "passing by pointer" and
"passing by reference" ? | | 5 |
| |
| For more C++ General Interview Questions Click Here |