main
| Line | |
|---|
| 1 |
|
|---|
| 2 | void main() {
|
|---|
| 3 | int a[] = {1, 2};
|
|---|
| 4 | int b[] = {[3]=3};
|
|---|
| 5 | int c[2][3] = {1, 2, 3, 4, 5, 6};
|
|---|
| 6 | struct foo {
|
|---|
| 7 | double x;
|
|---|
| 8 | int y;
|
|---|
| 9 | };
|
|---|
| 10 | struct foo f = {.y=999};
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 | typedef struct Interval {
|
|---|
| 14 | int left;
|
|---|
| 15 | int right;
|
|---|
| 16 | } Interval;
|
|---|
| 17 |
|
|---|
| 18 | typedef struct IntervalList {
|
|---|
| 19 | Interval value;
|
|---|
| 20 | Interval* next;
|
|---|
| 21 | } IntervalList;
|
|---|
| 22 |
|
|---|
| 23 | Interval result={.left = 2, .right = 3};
|
|---|
| 24 | IntervalList list2 = {.value = result, .next = 0};
|
|---|
| 25 |
|
|---|
| 26 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.