Functions Flashcards
1
Q
Define structures
A
Allow varibales to be grouped together and referenced by one pointer
2
Q
Give an example of a structure
A
struct Pixel {
int x, y;
int brightness;
}
3
Q
What are the difference between arrays and structures
A
Strutures can be included in arrays
Structures have named elements rather than index numbers
Structures can be used to group items of varied types
4
Q
Define a pointer
A
-declares an address (e.g. array pointer declares an array)
5
Q
Define a function
A
Code that performs a particular task that can be called upon many times.
-controls a scope of variables