Answer: Actually, concept of library of functions came into existence with K and R C implementation. Though K & R C had very little in the way of library of functions to support input and output. Programmers who wanted sophisticated I/O functionality than that provided had to implement their own.
This situation was greatly improved in Standard I/O library, a collection of functions which implemented much of added functionality which the programmer had been implementing on their own. This library expanded on the existing functions, for ex. printf(), creating new functions which could be used in a variety of situations. Further, standard library introduced the concept of Buffered I/O which enhances the efficiency of most programs.
But standard library of I/O functions had two significant drawbacks, first, it’s implemented on one particular machine without giving much thought to other machines with different architectural features. And second was directly related to first. As soon as first drawback discovered, programmers’ attempted to fix that by modifying the library functions. And as soon as they did so, though, functions were no longer standard thereby reducing portability.
ANSI C implementations evolved through long diligence over the existing standard I/O library. Functions in ANSI C implementations were direct descendants from standard I/O library. Portability and completeness were key considerations in the design of ANSI library. Most of the differences between ANSI implementation and their counterparts are the additions that enhance the portability or functionality. However, a continuous diligence might improve them further but they will not modifying already existing functions. Instead, they will be implemented as separate functions in the library. Thus portability doesn’t suffer.
Sanfoundry Global Education & Learning Series – 1000 C Tutorials.
- Check Computer Science Books
- Apply for C Internship
- Practice Computer Science MCQs
- Watch Advanced C Programming Videos
- Practice BCA MCQs