| Other C++ General Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| how many controls can we place on single form.
| Microsoft | 1 |
| What is size of empty class object | CA | 4 |
| What are different types of polymorphism supported by C++ | CA | 2 |
| what is oops
| | 2 |
| What is OOPs | CA | 9 |
| what is the behaviour of C and C++ compiler for the below
statements.
int *p;
p = malloc(100);
Is the behaviour same ? or different ? | | 2 |
| write infinite loop in C++ which does not use any variable
or constant? | | 2 |
| If P is the population on the first day of the year, B is
the birth rate, and D is the death rate, the estimated
population at the end of the year is given by the formula:
The population growth rate is given by the formula:
B – D
Write a program that prompts the user to enter the starting
population, birth and death rates, and n, the number of
years. The program should then calculate and print the
estimated population after n years. Your program must have
at least the following functions:
1. growthRate: This function takes its parameters the
birth and death rates, and it returns the population growth
rate.
2. estimatedPopulation: This function takes its
parameters the current population, population growth rate,
and n, the number of years. It returns the estimated
population after n years
Your program should not accept a negative birth rate,
negative death rate, or a population less than 2.
| | 1 |
| implement stack using stack.h headerfile functions | Subex | 1 |
| What is "map" in STL? | | 1 |
| What are raw sockets, where they are efficient? | Symphony | 1 |
| Can inline functions have a recursion? Give the reason? | | 2 |
| 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 |
| Implement strcmp | Citadel | 3 |
| Definition of class?
| | 12 |
| difference between the c++ and c languages
| Wipro | 2 |
| how can u create a doubly linked list with out using
pointers? | | 2 |
| 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 a struct in C and in C++? | Wipro | 4 |
| Brief explaination about #include<iostream.h>,
cin and cout | | 3 |
| |
| For more C++ General Interview Questions Click Here |