2-Functions Flashcards

1
Q

A function

A

A group of statements that together perform a task

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

main ()

A

Every C program has at least this one function

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

A function decleration

A

Tells the compiler about a function’s name, return type, and parameters

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

A function definition

A

Provides the actual body of the function

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

Function Return Type

A

The data type of the value the function returns

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

Function Name

A

The actual name of the function

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

Parameter list

A

Refers to the type, order, and number of the parameters of a function

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

Function Body

A

Contains a collection of statements that define what the function does

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

int max(int num1, int num2);

Given the function declaration above, which parts of the function comprise the function signature? Select all that apply.

A

Function name max
parameter int num2
parameter int num1

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

To call a function, you simply need to pass the required parameters along with the function name

A

True

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

Regarding calling a function, arguments are used when _________ a function.

A

Calling

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

When calling a function, call by value refers to what behavior?

A

copies the actual value of an argument into the formal parameter of the function

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