#include<stdio.h>
struct point
{
int x;
int y;
};
struct rect
{
struct point pt1;
struct point pt2;
};
int main()
{
struct point pt1 = {-10, -10};
struct point *pp;
pp = &pt1;
struct rect r = { {2,3},{5,6}}, *rp = &r;
printf("%d, %d \n", (*pp).x, (*pp).y);
printf("X = %d, %d and Y = %d, %d\n", rp->pt1.x, r.pt2.x, rp->pt1.y, rp->pt2.y);
return 0;
}
Top