In C, strings are null (or NUL) terminated ("backslash 0"). The PDP-11 assembly language supported NUL terminated strings, as did Martin Richards' BCPL, the precursor of C. Dennis Ritchie found the use of a NUL terminator more convenient than having to store the length of a string. It also makes for some elegant pointer based code!
No comments:
Post a Comment