हिंदी

Explain Use of Memory Management Operators in C++. - Computer Science 1

Advertisements
Advertisements

प्रश्न

Explain use of Memory Management Operators in C++.

टिप्पणी लिखिए

उत्तर

Use of memory management operator : new and delete
(1) The new operator is used to create objects of any type.
(2) The syntax is as follows :
      Pointer_variable = new data type;
(3) Example : p = new int; // p is pointer of type int .
(4) The delete operator is used to destroy the variable from the memory space so that the same space can be used for another use.
(5) The syntax of delete is as follows :
            delete pointer variable ;
(6) Example: delete p; // delete pointer variable p from memory.

shaalaa.com
C++ Programming
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2015-2016 (March)

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×