Explanatory Question
What is NULL in C?
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.
NULL is a macro which is defined in C header files. The value of NULL macro is 0. It is defined in C header files as below.
#define NULL (void *) 0;
NULL is used for pointers only as it is defined as (void *) 0. It should not be used other than pointers. If NULL is assigned to a pointer, then pointer is pointing to nothing.
First read the answer fully, then try to explain it in your own words. After that, open a few related questions and compare the concepts. This method helps you remember the topic for a longer time and improves exam preparation.