unlike arrays ,structure must be defined first for their format that may be used later to declare structure variable.
syntax
struct book_bank
{
char title[20];
char author[10];
int pages;
};
Explanation
the keyword struct keyword declares a structure to hold the details of three data fields,namely title,author,pages.
these fields are called structure element or member
general form of structure
struct tag_line
{
data type member1;
data type member2;
};
0 comments:
Post a Comment