Declare a structure whose tag name is point2d and that contains exactly two fields (or members, both of type double . the first field is x and the second field is y.

Respuesta :

In the C language, a structure is declared as follows :

 

struct <tag name> {

     <1st member type> <1st member name>

     <2nd member type> <2nd member name>

      …..

     <nth member type> <nth member name>

};

 

Thus, a structure whose tag name is point2d that contains x and y, both double, is :

 

struct point2d {

    double x;

    double y;

};