| Other C++ General Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Can we declare destructor as static? Explain? | | 2 |
| how to swap two numbers with out using temp variable | | 6 |
| When volatile can be used? | Symphony | 2 |
| what is static function | Patni | 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 |
| What is Object Oriented programming.what is the difference
between C++ and C? | Infosys | 5 |
| How Virtual functions call up is maintained? | | 2 |
| class Foo {
int x;
public:
Foo(int I);
};
If a class does not have a copy constructor explicitly
defined one will be implicitly defined for it. Referring to
the sample code above, which one of the following
declarations is the implicitly created copy constructor?
a) Foo(Foo *f);
b) Foo(Foo &f);
c) Foo(const Foo *f);
d) Foo(const Foo &f);
e) Foo(int);
| Quark | 3 |
| In a class only declaration of the function is there but
defintion is not there then what is that function?
| Hughes | 4 |
| The "virtual" specifier in a member function enables which
one of the following?
a) Monmorphism
b) Late binding
c) Metamorphism
d) Solomorphism
e) Inheritance
| Quark | 3 |
| what is data Abstraction? and give example | TCS | 13 |
| What C++ libraries are you proficient with? | Google | 1 |
| What are the basics of classifying different storage types,
why? | Symphony | 2 |
| Definition of class?
| | 10 |
| What is Memory Alignment? | TCS | 1 |
| Can you explain the term "resource acquisition is
initialization?" | | 1 |
| What is virtual constructor paradigm? | HP | 3 |
| 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 |
| Why preincrement operator is faster than postincrement? | | 3 |
| Can inline functions have a recursion? Give the reason? | | 1 |
| |
| For more C++ General Interview Questions Click Here |