C Structures

C does not have classes like C++ or Java. But it lets us define datastructures which could be called "classes without methods". In Java this would be represented by a class with no methods (also no constructor) and public members.

   struct point {
          int x;
          int y;
       };

   struct point foo = { 0, 0};  // struct is part of the name
   struct point bar;
          bar.x = 1;
          bar.y = 2;

   struct point foobar;
        foobar = (struct point) { 4, 4};  // anonymous struct in C99