Define void pointer

Define void pointer.

A void pointer is pointer which has no specified data type. The keyword ‘void’ is preceded the pointer variable, because the data type is not specific. It is also known as a generic pointer. The void pointer can be pointed to any type. If needed, the type can be cast.
Ex: float *float_pointer;
int *int_pointer;
void *void_pointer;
. . . . . . . .
. . . . . . . .
void_pointer = float_pointer;
. . . . . . . .
. . . . . . . .
void_pointer = int_pointer;

A void pointer is generally used as function parameters, when the parameter or return type is unknown.
What is a const pointer?
A const pointer is not the pointer to constant, it is the constant. For example, int* const ptr; indicates that ptr is a pointer......a
Explain memory leak
An unwanted increase in programs is referred as a memory leak is C language...
What is static memory allocation and dynamic memory allocation?
Static Memory Allocation: Memory is allocated for the declared variable by the compiler....
Post your comment
Discussion Board
Void Pointer
If you want to fetch the value pointed by void pointer then you have to use proper casting of to get the value e.g .

*(int*)a :: To get the integer value
*(char*)a :: To get the char value
*(float*)a :: To get the float value
Amber Bhhardwaj 10-26-2014