0
In C programming, which of the following is correct about why all pointers should be set to NULL if they are not pointing to anything?
- AWhen a pointer is initialized to NULL, it does not help in avoiding dangling pointers (pointers that reference invalid or deallocated memory).
- BSetting pointers to NULL is merely a norm and has no effect on program execution.
- CIf a pointer is not pointing to anything, the program won’t execute at all, giving a syntax error message.
- DWhen a pointer is initialized to NULL, it signifies that the pointer does not currently reference any valid memory location.
Correct answer: D