source:
CIVL/mods/dev.civl.abc/examples/side-effects/returns.c
| Last change on this file was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 122 bytes | |
| Line | |
|---|---|
| 1 | #include <assert.h> |
| 2 | |
| 3 | int i=10; |
| 4 | |
| 5 | int f() { |
| 6 | return i++; |
| 7 | } |
| 8 | |
| 9 | int main() { |
| 10 | int y=f(); |
| 11 | |
| 12 | assert(y==10); |
| 13 | assert(i==11); |
| 14 | } |
Note:
See TracBrowser
for help on using the repository browser.
