#include <stdio.h>
// this typedef makes the code more readable
typedefstruct Point Point ;
struct Point
{
int x;
int y;
};
// if there is nothing to return, make the return type void
void Point_init( Point* p )
{
if( p != NULL ) // this sanity check may be a good idea
p->x = p->y = 0 ; // equivalent to (*p).x = (*p).y = 0 ;
}
int main()
{
Point a;
Point* p = &a ;
Point_init(p) ;
printf( "Point(%d,%d)\n", a.x, a.y );
}