An API (Application Programming Interface) is a
specification (description) of a set of functions.
A library is an *implementation* of an API.
The ANSI C standard provides an API in the form
of a guaranteed set of interfaces for I/O, strings, etc.
On the other hand, /usr/lib/libc.so is a library
which implements that interface.
Another way to think of it is that you "program towards
an API" and you "link to a library".
What is the difference between an API and a library in context of C???????????????
An API is a library (or any other prepackaged functionality like Web services, COM components, simple Web pages, etc) that's meant to be used by someone different than the author.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment