| Other C++ General Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what is the order of initialization for data? | TCS | 4 |
| Write a program that read 2o numbers in and array and
output the second largest number. Can anybody help?? | | 2 |
| How to write a program such that it will delete itself after
exectution? | | 1 |
| what is importance of data sturture in a programming
language? | L&T | 10 |
| Write a function which takes a character array as input and
reverses it in place. | Lehman-Brothers | 2 |
| What is the output of printf("%d")? | HCL | 25 |
| What is the difference between method and message? | HP | 2 |
| Explain "passing by value", "passing by pointer" and
"passing by reference" ? | | 5 |
| Implement strcmp | Citadel | 2 |
| What is Pure Virtual Function? Why and when it is used ? | Lucent | 4 |
| What is the Difference between "C structure" and "C++
structure"? | | 4 |
| what is static function | Patni | 2 |
| 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 |
| 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 |
| Is there any difference between dlearations int* x and int
*x? If so tell me the difference? | Lason | 13 |
| What is the difference between Class and Structure? | HP | 2 |
| What issue do auto_ptr objects address? | | 1 |
| What is a pure virtual function?
Why is it represented as = 0...how is the internal
implementation for the same | CTS | 3 |
| what is difference between static and non-static variables | | 4 |
| What are Binay tress and B trees? Diff between them? | CTS | 3 |
| |
| For more C++ General Interview Questions Click Here |