Level 63
Level 65
7 words 0 ignored
Ready to learn
Ready to review
Ignore words
Check the boxes below to ignore/unignore words, then click save at the bottom. Ignored words will never appear in any learning session.
Ignore?
structure
s another user defined data type available in C that allows to combine data items of different kinds.
Defining a Structure
struct [structure tag] { member definition; member definition; ... member definition; } [one or more structure variables];
Defining a Structure
struct Books { char title[50]; char author[50]; char subject[100]; int book_id; } book;
Accessing Structure Members
To access any member of a structure, we use the member access operator (.)
Pointers to Structures
struct Books *struct_pointer;
struct_pointer->title;
To access the members of a structure using a pointer to that structure, you must use the → operator as follows
Bit Fields
allow the packing of data in a structure