Some important terms about POINTER in C++ language
1. Pointer: Pointer is a variable that stores a memory address of another variable.
2. Generic Pointer: The void pointer is also known as a void pointer and it is a special type of pointer that can be pointed at objects of any data type. Literal meaning of generic pointer is a pointer which can point any type of data. A void pointer is declared like a normal pointer using the void keyword.
3. NULL Pointer: NULL pointer is a type of pointer of any data type and generally takes a value as zero. That is, however not mandatory. This denotes that NULL pointer does not point to any valid memory address.
4. Wild Pointer: Wild pointers are pointers that have not been initialized and can make a program crash or behave abnormally. This is due to the fact that in the C++ programming language, pointers that are not specifically initialized point to unpredictable address in memory.
5. Pointer to Pointer: Pointer to Pointer is a variable holding the address of another variable or pointer variable which is written as " **ptr". They can also be said as double pointers. It may exceeds up-to n times depending to programming requirement.
6. Dereference Operator: The Dereference operation starts at the pointer and follow its arrows over to access its pointer. The goal may be to look at the pointer state or to change the pointer state.
7. Dynamic Memory Allocation: Dynamic memory management is handled by the new and delete operators. In most cases, handling memory involves the common action of making sure to delete any pointer that was allocated with new when does with it. The concept of arrays has a block of memory reserved.
8. New Operator: The new operator in C++ is used for dynamic storage allocation. This operator can be used to create object of any type.
9. Delete Operator: The delete operator in C++ is used for releasing memory space when the object is no longer needed. Once a new operator is used, it is efficient to use the corresponding delete operator for release of memory.
Thanks
Mukesh Rajput
Post A Comment:
0 comments: