| Other C++ General Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| difference between c and c++? | Infosys | 8 |
| How to reduce a final size of executable? | | 1 |
| Which algorithm do you like the most? Why? | Google | 1 |
| What is "mutable" keyword? | | 2 |
| How is an Abstract Base Class(ABC) related to an "Abstract
Data Type" (ADT) | | 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 |
| what is an array
| | 12 |
| Explain the difference between 'operator new' and the 'new'
operator? | Lucent | 1 |
| What is the difference between = and == in C? | Intel | 8 |
| Why is it difficult to store linked list in an array? | Lucent | 2 |
| How many bit combinations are there in a byte? | Intel | 7 |
| Shall we use 'free' to free memory assigned by new, What are
the further consequences?? | Symphony | 4 |
| What is Pure Virtual Function? Why and when it is used ? | Lucent | 4 |
| What C++ libraries are you proficient with? | Google | 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 Diffrence between a "assignment operator" and a
"copy constructor"? | Wipro | 2 |
| how to swap two strings without using any third variable ? | | 3 |
| How the V-Table mechanism works? | 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 |
| Difference between Top down and bottom up approaches for a
given project ? | HP | 1 |
| |
| For more C++ General Interview Questions Click Here |