...
Code Block | ||
---|---|---|
| ||
signed int si1, si2, sum; /* Initialize si1 and si2 */ if (((si1>0) && (si2>0) && (si1 > (INT_MAX-si2))) || ((si1<0) && (si2<0) && (si1 < (INT_MIN-si2)))) { /* handle error condition */ } else { sum = si1 + si2; } |
...
...
Code Block | ||
---|---|---|
| ||
signed int si1, si2, sum; /* Initialize si1 and si2 */ if (((si1>0) && (si2>0) && (si1 > (INT_MAX-si2))) || ((si1<0) && (si2<0) && (si1 < (INT_MIN-si2)))) { /* handle error condition */ } else { sum = si1 + si2; } |
...