ExplanationIn the above example variable p, dand c are variable of type int, floatand char
respectively. Pointer ptis a pointer of type void. All these variables are declared before main (). The
pointer is initialized with the address of integer variable p i.e. the pointer p points to variable x.
The statement *(int *) pt = 12 assigns the integer value 12 to pointer pti.e to variable p. The contents
of variable p
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.