C Pointers Question:

Download Job Interview Questions and Answers PDF

Tell me is NULL always defined as 0(zero)?

C Pointers Interview Question
C Pointers Interview Question

Answer:

NULL is defined as either 0 or (void*)0. These values are almost identical; either a literal zero or a void pointer is converted automatically to any kind of pointer, as necessary, whenever a pointer is needed (although the compiler can't always tell when a pointer is needed).

Download C Pointers Interview Questions And Answers PDF

Previous QuestionNext Question
Tell me when is a void pointer used?Can we add pointers together?