source:
CIVL/mods/dev.civl.com/examples/languageFeatures/pointerAdd1.cvl@
8553be8
| Last change on this file since 8553be8 was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 180 bytes | |
| Line | |
|---|---|
| 1 | int main(){ |
| 2 | #ifdef ARRAY |
| 3 | int a[10]; |
| 4 | #ifdef WRONG |
| 5 | int *p=a+11; |
| 6 | #else |
| 7 | int *p=a+10; |
| 8 | #endif |
| 9 | #else |
| 10 | int x = 9; |
| 11 | #ifdef WRONG |
| 12 | int *p=&x+2; |
| 13 | #else |
| 14 | int *p = &x+1; |
| 15 | #endif |
| 16 | #endif |
| 17 | } |
Note:
See TracBrowser
for help on using the repository browser.
