| 21. | Similarly, the successor can be found by going right once and left until a null pointer is found.
|
| 22. | Dereferencing a null pointer is illegal.
|
| 23. | A null pointer is a pointer in a computer program that does not point to any object or function.
|
| 24. | C doesn't have strings at all, but does have " null pointers ", which are also a weird concept.
|
| 25. | If either of those assumptions is wrong, one of the methods will be invoked on null, producing a null pointer error.
|
| 26. | During compilation time these are initialized by language specific rules ( to undefined values, 0, NULL pointers, . . . ).
|
| 27. | C + + 11 corrects this by introducing a new keyword to serve as a distinguished null pointer constant : nullptr.
|
| 28. | However, the internal representation of the null pointer may be any bit pattern ( possibly different values for different data types ).
|
| 29. | For example, if the expected type is int *, then a null pointer should be passed as ( int * ) NULL.
|
| 30. | Since the dawn of C in 1972, the constant 0 has had the double role of constant integer and null pointer constant.
|