What is NULL in C?
Short Answer
Views 782
Answer:
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.
Related Articles:
This section is dedicated exclusively to Questions & Answers. For an in-depth exploration of C Programming Language, click the links and dive deeper into this subject.
Join Our telegram group to ask Questions
Click below button to join our groups.