abs

Name

abs -- returns the absolute value

Synopsis

#include <stdlib.h>

int abs(int i);

Description

This function accepts a signed int value and returns the absolute value, as a signed int value which is positive.

See Also

labs, stdlib

Examples

Getting the absolute value