Output absolute value (int type)
Returns the absolute value of j (size of j), | j |.
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.
#include <stdlib.h> void func(int l) { int val; val = -15; l = abs(val); /*Returns absolute value of val, 15, to 1.*/ } |