What is a Default constructor?
Answer / munendra kumar
A constructor that has no arguments.
If you don't code one, the compiler provides one if there are no other constructors. If you are going to instantiate an array of objects of the class, the class must have a default constructor.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is static function? Explain with an example
Differentiate between realloc() and free().
Which sort is best for the set: 1 2 3 5 4 a) Quick Sort b) Bubble Sort c) Merge Sort
What is protected inheritance?
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.
Write a recursive program to calculate factorial in c++.
What are the restrictions apply to constructors and destructors?
Write a function to find the nth item from the end of a linked list in a single pass.
What is a string example?
What is array in c++ pdf?
What is rtti in c++?
Are c and c++ similar?