| Other C++ General Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Describe functional overloading? | HP | 3 |
| What are the techniques you use for debugging? | Adtran | 1 |
| what is importance of data sturture in a programming
language? | L&T | 10 |
| Write the program form Armstrong no in c++? | | 3 |
| How to change constant values? | Symphony | 3 |
| how to find the maximum of 10 numbers ? | | 2 |
| What is the difference between public, private, protected
inheritance? | Wipro | 4 |
| What is the difference between method and message? | HP | 2 |
| What is the difference between static global and global ? | CA | 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 |
| What compiler was used?
| Intel | 3 |
| what is data Abstraction? and give example | TCS | 13 |
| wrong statement about c++
a)code removably
b)encapsulation of data and code
c)program easy maintenance
d)program runs faster | | 8 |
| How do you test your code?
| Microsoft | 3 |
| class Alpha {
public:
char data[10000];
Alpha();
~Alpha();
};
class Beta {
public:
Beta() { n = 0; }
void FillData(Alpha a);
private:
int n;
};
How do you make the above sample code more efficient?
a) If possible, make the constructor for Beta private to
reduce the overhead of public constructors.
b) Change the return type in FillData to int to negate the
implicit return conversion from "int" to "void".
c) Make the destructor for Alpha virtual.
d) Make the constructor for Alpha virtual.
e) Pass a const reference to Alpha in FillData
| Quark | 1 |
| What are the differences between public, private, and
protected access? | Wipro | 3 |
| How to avoid a class from instantiation? | Symphony | 5 |
| What are the different types of polymorphism? | | 2 |
| What is the output of printf("%d")? | HCL | 25 |
| What is the difference between Pointer and a Reference?
When you would use them? | Wipro | 2 |
| |
| For more C++ General Interview Questions Click Here |