C Language: labs function
(Absolute Value of Long Integer)
In the C Programming Language, the labs function returns the absolute value of a long integer.
Syntax
The syntax for the labs function in the C Language is:
long int labs(long int x);
Parameters or Arguments
- x
- A value to convert to an absolute value.
Returns
The labs function returns the absolute value of a long integer represented by x.
Required Header
In the C Language, the required header for the labs function is:
#include <stdlib.h>
Applies To
In the C Language, the labs function can be used in the following versions:
- ANSI/ISO 9899-1990
Similar Functions
Other C functions that are similar to the labs function:
Advertisements