It’s time to spread your wings a little bit. We’re now going to sort an array of C strings. These are ASCIIZ character representations of C text strings. Whereas an integer takes up a single qbyte (8-bytes or 64 bits) of memory, each C string takes up one byte for each character of the string, followed by a single byte containing zero as a delimiter. A 64-byte string can hold 63 characters plus the ending zero byte. So, it takes 512 bytes of memory (64 * 8) to hold a 64-character C string.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Sorting an Array of Strings

  • John Schwartzman

摘要

It’s time to spread your wings a little bit. We’re now going to sort an array of C strings. These are ASCIIZ character representations of C text strings. Whereas an integer takes up a single qbyte (8-bytes or 64 bits) of memory, each C string takes up one byte for each character of the string, followed by a single byte containing zero as a delimiter. A 64-byte string can hold 63 characters plus the ending zero byte. So, it takes 512 bytes of memory (64 * 8) to hold a 64-character C string.