7.20.6.1 The abs, labs and llabs functions

Synopsis

1

#include <stdlib.h>
int abs(int j);
long int labs(long int j);
long long int llabs(long long int j);

Description

2

The abs, labs, and llabs functions compute the absolute value of an integer j. If the result cannot be represented, the behavior is undefined.[1]

Returns

3

The abs, labs, and llabs, functions return the absolute value.

Footnotes