C Structs


Simple Example

    #include <stdio.h>

    /* Code illustrating simple struct */

    struct point {
           int x;
           int y;
    };

    main()
    {
      struct point p;

      p.x = 3;
      p.y = 4; 

      printf("x: %d, y: %d\n", p.x, p.y);
    }


Alyce Brady, Kalamazoo College