source:
CIVL/examples/languageFeatures/compoundInit4.c
| Last change on this file was 8ed8eba, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 199 bytes | |
| Line | |
|---|---|
| 1 | #include <assert.h> |
| 2 | union Node { |
| 3 | union { |
| 4 | int a; |
| 5 | union { |
| 6 | int b; |
| 7 | union { |
| 8 | int c; |
| 9 | int d; |
| 10 | }; |
| 11 | }; |
| 12 | }; |
| 13 | }; |
| 14 | int main() { |
| 15 | union Node node = { .d=1 }; |
| 16 | assert(node.d==1); |
| 17 | } |
Note:
See TracBrowser
for help on using the repository browser.
