SEMrush

API in procedural languages



API in procedural languages

In procedural languages  an API is a set of functions or routines that accomplish a specific task and interact with a specific software component

For example, the math API on Unix systems is a specification on how to use the mathematical functions included in the math library. Among these functions there is a function, named sqrt(), that can be used to compute the square root of a given number.

This description means that sqrt() function returns the square root of a positive floating point number (single or double precision), as another floating point number.

Hence the API in this case can be interpreted as the collection of the include files used by a program, written in the C language, to reference that library function, and its human readable description provided by the man pages.

Similarly, other languages have procedural libraries; for example, Perl has dedicated APIs for the same mathematical task with built-in documentation available, which is accessible using the perldoc utility:

Example- Facebook , Bing , LinkedIn