Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

C programming/math.h/labs

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

In C language the function labs is included in header file stdlib.h. The abs() function computes and returns the absolute value of the integer argument i. The labs() function computes and returns the absolute value of the long integer argument, of the appropriate long integer type for the function. The llabs() function computes and returns the absolute value of long long integer argument. Description The labs() is a library function. It is used under #include<stdlib.h> header file. This function computes the absolute value of the long integer argument i. It also returns the absolute value of the argument. That is, if i is negative, the result is opposite of i, but if i is non-negative the result is i. Required header files include<stdio.h> include<stdlib.h> Syntax include<stdlib.h> long int labs(long int i); References http://cplusplus.com/reference/clibrary/cstdlib/labs/ http://linux.die.net/man/3/labs deep