source:
CIVL/examples/languageFeatures/compoundInit2.c@
397ae5f
| Last change on this file since 397ae5f was 8ed8eba, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 134 bytes | |
| Rev | Line | |
|---|---|---|
| [8ed8eba] | 1 | #include <assert.h> |
| 2 | struct Node { | |
| 3 | int x, y; | |
| 4 | }; | |
| 5 | int main() { | |
| 6 | struct Node node = { 1 }; | |
| 7 | assert(node.x==1); | |
| 8 | assert(node.y==0); | |
| 9 | } |
Note:
See TracBrowser
for help on using the repository browser.
