| Other C++ General Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| What are the techniques you use for debugging? | Adtran | 1 |
| Shall we use 'free' to free memory assigned by new, What are
the further consequences?? | Symphony | 4 |
| what is the use of templates? | | 3 |
| Disadvantages of c++ | | 5 |
| what is meaning of isa and hsa | | 1 |
| What is "mutable" keyword? | Infosys | 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 are advantages of C++ when comparing with C? | HP | 5 |
| What is Virtual Inheritance? | Wipro | 2 |
| What is the Difference between "C structure" and "C++
structure"? | | 6 |
| How do I open binary files? | | 1 |
| Memory is not a constraint. In a single iteration(NOTE: you
can't go back), how will you find out the 10th last
node/item in a linked list. | Goldman-Sachs | 10 |
| In a class, there is a reference or pointer of an object of
another class embedded, and the memory is either allocated
or assigned to the new object created for this class. In
the constructor, parameters are passed to initialize the
data members and the embedded object reference to get
inialized. What measures or design change should be advised
for proper destruction and avioding memory leaks, getting
pointers dangling for the embedded object memory
allocation? Please suggest. | GE | 4 |
| How long does this loop run:
for(int x=0; x=3; x++)
a) Never
b) Three times
c) Forever
| Quark | 10 |
| What are the differences between public, private, and
protected access? | Wipro | 5 |
| What is the output of printf("%d")? | HCL | 32 |
| What is name mangling? | | 1 |
| What is multithreading and what is its use?Whats are
multithreading techniques used in C++? | | 1 |
| Why would you make a destructor virtual? | Lehman-Brothers | 3 |
| What is size of null class? | HP | 4 |
| |
| For more C++ General Interview Questions Click Here |