abs()

Syntax

  #include <stdlib.h>


  

int abs(int i);

Description

abs() computes the absolute value of i.

Return

The absolute value of i; that is, i if i is positive and -i if i is negative. If i is -32,768, this value is returned and errno is set to ERANGE.

See also

fabs() and fabsf()

labs()