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;
}

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