Create a structure for Point - C Structure

C examples for Structure:Structure Value

Description

Create a structure for Point

Demo Code

#include <stdio.h>

int length, width;
long area;/* w w  w  .  j a va  2 s  .c  o  m*/

struct coord{
    int x;
    int y;
} myPoint;

int main( void )
{
    myPoint.x = 12;
    myPoint.y = 14;

    printf("\nThe coordinates are: (%d, %d).", myPoint.x, myPoint.y);

    return 0;
}

Result


Related Tutorials