Answer Posted / skybeaver
The "new" operator allocates a new instance of an object
from the heap, utilising the most appropriate constructor
for the arguments passed.
Like many operators in C++, the "new" operator for a
particular class can be overriden, although there is rarely
a need to do so. "operator new" is the mechanism for
overriding the default heap allocation logic. Ask your
interviewer to provide you with a concrete example of when
he or she has been required to do this.
| Is This Answer Correct ? | 14 Yes | 2 No |
Post New Answer View All Answers
Whats oop mean?
What is inheritance in oop?
What is multilevel inheritance in oop?
Why is destructor used?
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
What are oops functions?
why reinterpret cast is considered dangerous?
Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.
What is abstraction in oop?
What are the 3 principles of oop?
write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.
What is encapsulation in simple terms?
When not to use object oriented programming?
What does oop mean in snapchat?
What are oops methods?