Abstract

Many people have criticized the C programming language for its failure to enforce discipline in programming. They cite the lack of typechecking and the locutions that expose and indeed emphasize the underlying machine model. C is less often criticized for lack of efficiency. Yet in a critical part of the language -- string handling -- the efficiency of C falls short of the mark.String handling is a major application of C. In the original C book by Kernighan and Ritchie, nearly every example has something to do with strings. In systems programming, another major application, string handling is a large part of the task. If a skillful C programmer cannot easily write programs that manipulate strings efficiently, then the language has failed to meet one of its central goals.There are two problems with strings in C. The first is the use of a representation for strings in which a terminating null character indicates the length of the string. The second is the lack of built-in operations on strings analogous to the ones provided for arithmetic data.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.