Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
5 Cards in this Set
- Front
- Back
What is meant by a 'struct'? |
A 'data structure', a complex data type created by the user. |
|
How do you declare a struct? |
struct item { char field1; int field2; ... //etc }; |
|
How do you type-define a struct? How do you declare it in main? |
typedef struct item item int main() { item myVariable; } |
|
What is the syntax used to access a field of a struct? How? |
'fied selector notation' (symolised as a dot operator). myVariable.field1; |
|
How do you rapidly create many instances of a struct? |
Using an array. item list[SIZE]; ... //Then treat each index as its own variable list[i].field2; |