C Reference function abs()

This function of stdlib will return the absolute value of an integer.

Usage of abs():

int abs ( int x );


An integer x.

Return value:

The absolute value of integer x.

Source code example of abs():


	int main ()
		int x;

		printf ("x=%d\n",x);
		return 0;

Output of the abs example program above:


This entry was posted in C Reference stdlib.h Functions. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed. Tweet This! Tweet This! or use to share this post with others.

Comments are closed.