| Other C++ General Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Is there something that we can do in C and not in C++? | Patni | 6 |
| What happens if an exception is throws from an object's
constructor and from object's destructor? | TCS | 2 |
| How to implement flags? | Symphony | 1 |
| wrong statement about c++
a)code removably
b)encapsulation of data and code
c)program easy maintenance
d)program runs faster | | 8 |
| What is the use of static functions? | Symphony | 6 |
| write program for palindrome | | 3 |
| How the V-Table mechanism works? | HP | 3 |
| What is the difference between Class and Structure? | HP | 2 |
| How to avoid changing constant values? | Symphony | 1 |
| 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 |
| difference between c and c++? | Infosys | 8 |
| why can't we declare data member of class auto register or
extern | | 1 |
| Write a program that read 2o numbers in and array and
output the second largest number. Can anybody help?? | | 2 |
| What will happen if I allocate memory using "new" and free
it using "free" or allocate sing "calloc" and free it using
"delete"? | | 2 |
| Which one of the following describes characteristics of
"protected" inheritance?
a) The base class has access only to the public or protected
members of the derived class.
b) The derived class has non-public, inheritable, access to
all but the private members of the base class.
c) The derived class has access to all members of the base
class.
d) The private members of the base class are visible within
the derived class.
e) Public members of the derived class are privately
accessible from the base class.
| Quark | 3 |
| is throwing exception from a constructor not a good practice ? | Ericsson | 4 |
| How do I open binary files? | | 1 |
| Why preincrement operator is faster than postincrement? | | 3 |
| What happens if an exception is throws from an, object's
constructor and object's destructor? | Wipro | 1 |
| Can inline functions have a recursion? Give the reason? | | 1 |
| |
| For more C++ General Interview Questions Click Here |