C Pointers Question:

Download Job Interview Questions and Answers PDF

Tell me when is a void pointer used?

C Pointers Interview Question
C Pointers Interview Question

Answer:

A void pointer is used for working with raw memory or for passing a pointer to an unspecified type.
Some C code operates on raw memory. When C was first invented, character pointers (char *) were used for that. Then people started getting confused about when a character pointer was a string, when it was a character array, and when it was raw memory.

Download C Pointers Interview Questions And Answers PDF

Previous QuestionNext Question
For what purpose null pointer used?Tell me is NULL always defined as 0(zero)?