All members of a structure are private by default True False

All members of a structure are private by default. True False The new operator returns a pointer to newly allocated memory. True False

Solution


1) All members of a structure are private by default.

Answer: False
In c++ members of a structure are public by default and members of class are private by default.

2) The new operator returns a pointer to newly allocated memory.
Answer: True
In c++ for avoiding wastage of memory, new operator is used to dynamically allocate memory during runtime.

ptr = new float[number];

The above code returns a pointer to a section of memory just large enough to hold the the float data.
delete ptr;

After usage of new operator, delete operator is used to release back memory allocated using new operator as system may crash if there will be no memory available for the operating system.

 All members of a structure are private by default. True False The new operator returns a pointer to newly allocated memory. True FalseSolution 1) All members o

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site