Help please thank you The following structures are designed

Help please, thank you
The following structures are designed to store information about objects on a graphics screen. A point structure stores the x and y coordinates of a point on the screen. A rectangle structure stores the coordinates of the upper left and lower right corners of a rectangle. struct point j int x, int y;}; sruct rectangle j struct point upper left, lower right;};

Solution

Structures are used to represent a record .Suppose you want to keep track of your books in library.You might want to track the following attributes about each book

1)Title 2)Authour 3)Subject 4)Book ID

Structure is a another user defined data type avaailabel in C that allows to combine data iteams of different kinds.

To define a structure you must use the struct statement.

The struct statement defines a new data type with more than one member.

struct [structure tag]

{

member def;

member def;

.....

}[one or more structure variables]

example:

struct Books

{

char name[50];

int book_id;

book;

}

Accessing Structure Members

Help please, thank you The following structures are designed to store information about objects on a graphics screen. A point structure stores the x and y coord

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site