Different types of pointers

Void pointer (generic pointer) : a special type of pointer which point to some data
of no specific types.
void *p;

Null pointer : a special type of pointer which point nowhere.
it is usually used to check if a pointer is pointing to a null or free
the pointer during deallocation of memory in dynamic memory allocation;
it is define by using the predefine constant NULL
int *p=NULL;

Wild pointer : 
uninitialized pointer. it hold a garbage value. i.e it is not pointing to
any memory location yet.

Dangling pointer: pointer pointing to a destroyed variable.
it usually happen during dynamic memory allocation when the
object is destroyed but not free and the pointer is still pointing
to the destroy object.

Four registers are used to refer to four segments on the 16-bit x86 segmented memory architecture. DS (data segment), CS (code segment), SS (stack segment), and ES (extra segment). A logical address on this platform is written segment:offset, in hexadecimal.

Near pointers refer (as an offset) to the current segment.
Far pointers use segment info and an offset to point across segments. So, to use them, DS or CS must be changed to the specified value, the memory will be dereferenced and then the original value of DS/CS restored. Note that pointer arithmetic on them doesn’t modify the segment portion of the pointer, so overflowing the offset will just wrap it around.
And then there are huge pointers, which are normalized to have the highest possible segment for a given address (contrary to far pointers).
On 32-bit and 64-bit architectures, memory models are using segments differently, or not at all.

Here are the some of the book recommendations :


Enable GingerCannot connect to Ginger Check your internet connection
or reload the browser
Disable in this text fieldEditEdit in GingerEdit in GingerΓ—

Leave a Reply

Your email address will not be published. Required fields are marked *

Enable Notifications OK No thanks