InterviewSolution
| 1. |
Why Should We Use Null Or Zero In A Program? |
|
Answer» In C++, <cstdio> header defines NULL, a global SYMBOL that represents a null pointer. NULL has nothing to do with standard input/output except that some functions return a null pointer. C++ programmers do not USE the NULL global symbol, preferring to address zero pointer values with the CONSTANT INTEGER value 0. Another problem is that ignoring a 0 return could crash the system when the program tries to assign values through a zero-value pointer. In C++, <cstdio> header defines NULL, a global symbol that represents a null pointer. NULL has nothing to do with standard input/output except that some functions return a null pointer. C++ programmers do not use the NULL global symbol, preferring to address zero pointer values with the constant integer value 0. Another problem is that ignoring a 0 return could crash the system when the program tries to assign values through a zero-value pointer. |
|