source: CIVL/examples/experimental/unnamed_member_initialization.c

main
Last change on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 183 bytes
RevLine 
[65582ca]1#include<assert.h>
2
3struct T {
4 struct {
5 int x;
6 int y;
7 };
8 int z;
9};
10
11int main() {
12 struct T a = {.x = 1, .y = 2, .z = 3};
13
14 assert(a.x == 1 && a.y == 2 && a.z == 3);
15}
Note: See TracBrowser for help on using the repository browser.