C Reference function labs()

This function will return the absolute value of a long integer.

Usage of labs():

long int labs (long int n);


An integer n.

Return value:

Returns the absolute value of parameter n.

Source code example of labs():


	int main ()
		long int n,m;


		printf ("n=%ld\n",n);
		printf ("m=%ld\n",m);

		return 0;

Output of the labs 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.