1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#include <stdio.h>
#include <stdlib.h>

struct Point {
    int x, y;  // use separate lines in real code
};
int main(int argc, const char *argv[])
{
    struct Point p = { .x = 5, .y = 6 };
    printf("p.x == %d;   p.y == %d;\n", p.x, p.y);
    return 0;
}

© Copyright 2016 Alexander J. Quinn         This content is protected and may not be shared, uploaded, or distributed.