Integer type typically larger than `int`, used for storing large numeric values (platform-dependent size, commonly 4 or 8 bytes).
1st Parameter
The input value for which the absolute value is to be computed.
Read more about parameters of labs in parameters section
The labsfunction in C language Computes the absolute value of a long integer.
The labs function computes the absolute value of a long integer. It returns the magnitude of the input value without regard to its sign.
The labsfunction takes 1
parameter:
•
long int `x`: The input value for which the absolute value is to be computed.
Computes the absolute value of the given long integer `x`. The result is always a non-negative value of type `long int`. Returns the absolute value of `x`.
The labs function return value :
Returns the absolute value of the long integer argument
Output
This example demonstrates basic usage of labs function for a negative long integer.