| Other C++ General Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| How to reduce a final size of executable? | | 1 |
| Evaluate:
int fn(int v)
{
if(v==1 || v==0)
return 1;
if(v%2==0)
return fn(v/2)+2;
else
return fn(v-1)+3;
}
for fn(7);
a) 10
b) 11
c) 1
| Quark | 1 |
| Do we have private destructors? | Symphony | 9 |
| what is static function | Patni | 2 |
| What is the Difference between "printf" and "sprintf"? | iSoft | 3 |
| Explain the ISA and HASA class relationships. How would you
implement each in a class design? | | 2 |
| if i want cin 12345678910 and cout abcdefghij.
so how can i create the program?.
example : if i key in 8910 so the answer is ghij. | | 3 |
| What and all can a compiler provides by default? | HP | 3 |
| Consider a c++ template funtion
template<class T>
T& Add(T a, T b){return a+b ;}
if this function is called as
T c = Add("SAM", "SUNG");
what will happen? What is the problem in the template
declaration/ How to solve the problem. | Samsung | 4 |
| what is the order of initialization for data? | TCS | 4 |
| Why do C++ compilers need name mangling? | Lucent | 1 |
| What are the total number of lines written by you in C/C++?
What is the most complicated or valuable program written in
C/C++?
| Intel | 1 |
| Give 2 examples of a code optimization? | | 1 |
| Can we use resume in error handling i.e. in the catch block | Infosys | 3 |
| What are the differences between public, private, and
protected access? | Wipro | 4 |
| How Virtual functions call up is maintained? | | 2 |
| What are the basics of classifying different storage types,
why? | Symphony | 2 |
| What is "mutable" keyword? | | 2 |
| Write a program that read 2o numbers in and array and
output the second largest number. Can anybody help?? | | 2 |
| Difference between Operator overloading and Functional
overloading? | HP | 3 |
| |
| For more C++ General Interview Questions Click Here |