/* ex8-298-5.c Homework #8, Problem 1 */ /* This code does not produce the desired results */ #include #define ABS(a) ((a)<0 ? -(a): a) main() { int a[5]={0}; int k,d; for ( k = 0; k<5; k++){ d = ABS( a[k] = 2*k -5 ); printf("Absolute value of %d is %d\n", a[k], d); } return 0; }