Void pointer can hold the address of any kind of pointer. But we can't operate on void pointer
The void type has only one purpose: to specify the return type of a function that has no return value. In this case void simply means no type. The only other usage is when used as a pointer to void (void*), which simply means a pointer type that can refer to any type of object. If the pointer is non-null, it must be cast to a specific type before it can be dereferenced.
Void Pointer is a General purpose pointer ,that does not have any data type associated with it and can store address of any type of variable. Declaration: void * pointer_name;
Example: int *pi; void *pv; pv= (void *)pi; pi= (int *)pv;
void as function return-type means no return value void as function parameter means no parameter void * as pointer type means 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
void is type of pointer that usually means that you can make it point to any data type. When you make a pointer point to somewhere its data type should match with the place where you want it to point. When you dont know the data type where it will point to then you can declare a void pointer and make it point to the data type it want.
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.
Pointer to Pointer is a double pointer, denoted by (**). Pointer stores the address of the variable and pointer to pointer stores the address of a pointer variable and syntax can be given as int **ptr2ptr;
void pointer
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.
A void pointer variable is a pointer variable (of some type) that is assigned the value zero, meaning it points to address zero. Memory address zero is a reserved address, which means the pointer variable references nothing in particular.
void