#include
int abs(int i);
computes the absolute value of the integer i
===== C Sourcecode Example =====
#include /* including standard library */
//#include /* uncomment this for Windows */
/* for printf */
#include
int main( void )
{
int i = -42;
printf("abs from i = %d\n", abs(i));
return 0;
}
==== output with abort: ====
user@host:~/code-reference.com# ./abs
abs from i = 42