STL (140)
OOPS (873)
C++ General (2409)
What is the full form of c++?
Define stacks. Provide an example where they are useful.
What is the difference between map and hashmap in c++?
What is implicit conversion/coercion in c++?
Is nan a c++?
What do you know about Volatile keyword in C++? Explain with an example code.
What is c++ stringstream?
what are the iterator and generic algorithms.
What is the use of 'using' declaration in c++?
How can we access protected and private members of a class?
In what situations do you have to use initialization list rather than assignment in constructors?
What Is A Conversion Constructor C++ ?
Why was c++ created?
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. please answer my question ....
We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?