This shows you the differences between two versions of the page.
|
c:assert.h:assert [2013/02/28 18:01] 153.109.180.131 [C Sourcecode Example] |
c:assert.h:assert [2024/02/16 01:06] (current) |
||
|---|---|---|---|
| Line 26: | Line 26: | ||
| int main ( void ) { | int main ( void ) { | ||
| printf("9 / 4 = %d\n", testfunc(9, 4) ); | printf("9 / 4 = %d\n", testfunc(9, 4) ); | ||
| - | printf("1 / 0 = %d\n", testfunc(1, 0) ); | + | printf("1 / 1 = %d\n", testfunc(1, 1) ); |
| printf("0 / 9 = %d\n", testfunc(0, 9) ); | printf("0 / 9 = %d\n", testfunc(0, 9) ); | ||
| return 0; | return 0; | ||
| Line 37: | Line 37: | ||
| user@host:~$ ./assert | user@host:~$ ./assert | ||
| 9 / 4 = 2 | 9 / 4 = 2 | ||
| - | 1 / 0 = 1 | + | 1 / 1 = 1 |
| assert: assert.c:6: testfunc: Assertion `(a >= 0 && a >= b) && (b >= 0)' failed. | assert: assert.c:6: testfunc: Assertion `(a >= 0 && a >= b) && (b >= 0)' failed. | ||
| canceled | canceled | ||