paper 2, pseudocode and algorithms Flashcards
What is a pointer?
A pointer is a variable which is capable of storing the initial address of the object of which it wants to point to.
What are the different types of pointers?
- Wild Pointer
- NULL Pointer
- Dangling Pointer
- Void Pointer
What is the Wild Pointer?
Wild Pointers are pointers that are not initialized. The pointer may be initialized to a non-NULL value. Has no initial or end address
What is the NULL Pointer?
A NULL Pointer is a pointer that points to nothing.
+ we can initialize a pointer variable when that pointer variable is not assigned any actual memory address
+ we can pass a null pointer to a function argument when we are not willing to pass any actual memory address
What is the Dangling Pointer?
The Dangling Pointer is a pointer that points to a memory location that has been deleted.
What is a Void Pointer?
A Void Pointer is a pointer that is not allied with any data types. Also known as general-purpose pointer.