Answer Posted / naveen kumar
The copy constructor is a constructor which creates an object by initializing it with an object of the same class, which has been created previously.
|Is This Answer Correct ?||1 Yes||0 No|
What is the difference between a "copy constructor" and an "assignment operator" in C++?
Explain function prototypes in C++.
Why can’t you call invariants() as the first line of your constructor?
What do you mean by persistent and non persistent objects?
Mention the purpose of istream class?
What are vtable and vptr?
What is a stack? How it can be implemented?
Why use of template is better than a base class?
Is it possible to get the source code back from binary file?
On throwing an exception by the animal constructor in p = new animalq, can memory leak occur?
If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?
What is protected inheritance?
How can we access protected and private members of a class?
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 ....
Write a function that swaps the values of two integers, using int* as the argument type?