Everything

labs


Output absolute value (long type)

[Classification]

Standard library

[Syntax]

#include <stdlib.h>

long labs(long j);

[Return value]

Returns the absolute value of j (size of j), | j |.

[Description]

This function obtains the absolute value of j (size of j), | j |. If j is a negative number, the result is the reversal of j. If j is not negative, the result is j. This function is the same as abs, but uses long type instead of int type, and the return value is also of long type.