there are basically 5 data types in C.
Int, Char, Float , Double and Void.
The type Void either explicitly declares a function as returning no values or creates generic pointers.
when we declare
when we declare p as an integer pointer means it will store the address of integer type data.
As I told Void pointer is a generic pointer which means it can store the address of other types as required.
here as you see first address of int is stored in void * p.
to access the value at that address you have to typecast with the type which is stored in that void ptr.
here to access value at p we have to use