creating and using functions Flashcards

1
Q

function header syntax

A

return_type function_name (parameters);

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

a function name can be…?

A

anything the programmer wishes

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

parameters

A

optional
new variables, each separated by a comma

variables in a function definition

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

a function header does…?

A

nothing, besides declaring a function

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

function body

A

code wrapped in curly braces
required for a function to do anything

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

invoking a function

A

calling a function/using a function in main

functions cannot run automatically

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

arguments

A

variables passed as inputs for any function

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