When a variable is declared as being a pointer to type void it is known as a generic pointer. Since you cannot have a variable of type void, the pointer will not point to any data and therefore cannot be dereferenced. It is still a pointer though, to use it you just have to cast it to another kind of pointer first. Hence the term Generic pointer.
generic pointer is a pointer that can not be dereferenced i.e one type pointer can not be assigned to another type.
void as function return-type means no return value void as function parameter means no parameter void * as pointer type means generic pointer
No, 'void *' and 'double *' are ok; 'void double *' is syntax error.On the other hand 'void **p' is totally correct: p holds the address of a generic pointer.
Increment or decrement the pointer by the required offset.
The pointer that points to a block of memory that does not exist is called a dazzling pointer or wild pointer
... are usable. 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.
A Null pointer has the value 0. void pointer is a generic pointer introduced by ANSI. Before ANSI, char pointers are used as generic pointer. Generic pointer can hold the address of any data type. Pointers point to a memory address, and data can be stored at that address.
void as function return-type means no return value void as function parameter means no parameter void * as pointer type means generic pointer
Generic pointer of type 'void *' is compatible with any (data-)pointer, but you cannot use the following operators on it: + - ++ -- += -= * -> []
No, 'void *' and 'double *' are ok; 'void double *' is syntax error.On the other hand 'void **p' is totally correct: p holds the address of a generic pointer.
You don't use 'VOID', but 'void'. It means different things, such as:- void as function type means no return value- void as function parameter means no parameters- 'void *' as pointer-types means generic pointer
It is a pointer that points to a member of a structure.
Increment or decrement the pointer by the required offset.
no
the purpose of pointer in c for saving the memory space.,and reduce the length and complexity of the program
Pointer in C is Memory Reference. It stores memory address of any variable, constant, function or something you later use in your programming. Pointer basically used to ease the referencing of variables and others or in polymorphism and inheritance.
... are usable. 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.
The pointer that points to a block of memory that does not exist is called a dazzling pointer or wild pointer