source:
CIVL/mods/dev.civl.abc/examples/compound2.c
| Last change on this file was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 215 bytes | |
| Line | |
|---|---|
| 1 | // a is initialized using a compound literal to define |
| 2 | // a literal array. The array is converted to pointer to int. |
| 3 | void main() { |
| 4 | int *a = (int[]){ [2] = 3 }; |
| 5 | |
| 6 | // int *b = { [2] = 3 }; // wrong |
| 7 | a[1]=1; |
| 8 | } |
Note:
See TracBrowser
for help on using the repository browser.
