Embedded Software Engineer Question:
Tell me what is NULL pointer and what is its use?
Answer:
The NULL is a macro defined in C. Null pointer actually means a pointer that does not point to any valid location. We define a pointer to be null when we want to make sure that the pointer does not point to any valid location and not to use that pointer to change anything. If we don't use null pointer, then we can't verify whether this pointer points to any valid location or not.
Previous Question | Next Question |
Tell me can static variables be declared in a header file? | Tell me what are the different storage classes in C? |