Functions Flashcards

1
Q

Define structures

A

Allow varibales to be grouped together and referenced by one pointer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Give an example of a structure

A

struct Pixel {
int x, y;
int brightness;
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Define a pointer

A

-declares an address (e.g. array pointer declares an array)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Define a function

A

Code that performs a particular task that can be called upon many times.
-controls a scope of variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly