Describe the action of the new operator. What does the new operator return? What are the indications of error?

What will be an ideal response?


The new operator takes a type name for its argument, new allocates space on the
freestore for a variable of the type of the argument. It returns a pointer to the allocated
memory if there is enough memory space. If there is insufficient memory space the
new operator may abort the program, or return a null pointer, depending on your
particular compiler.

Computer Science & Information Technology

You might also like to view...

Employee is a base class and HourlyWorker is a derived class, with a redefined non-virtual print function. Given the following statements, will the output of the two print function calls be identical?

HourlyWorker h; Employee *ePtr = &h; ePtr->print(); ePtr->Employee::print(); a. Yes. b. Yes, if print is a static function. c. No. d. It would depend on the implementation of the print function.

Computer Science & Information Technology

This term describes congested data flow.

What will be an ideal response?

Computer Science & Information Technology

Objective-C, C#, and Java are all derivatives of the C programming language.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

When inserting graphics or other objects from a file, the original document is called the ____ file.

A. source B. major C. destination D. minor

Computer Science & Information Technology