CHAP 6 FUNCTIONS Flashcards

(21 cards)

1
Q

A FUNCTION DECLARATION THAT INCLUDES THE BODY OF THE FUNCTION.

A

FUNCTION DEFINITION

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

IT ALLOWS THE CALLED FUNCTION TO DIRECTLY ALTER THE VARIABLES VALUE.

A

REFERENCE

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

When you send a parameter to a function and its value will NOT BE MODIFIED, use a [] parameter. When the function is CHANGING the actual parameter, such as in an input function, use a [] parameter.

A

VALUE
REFERENCE

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

A PROGRAM TO BE BROKEN INTO SMALL TASKS.

A

FUNCTIONS

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

A [ ] parameter is noted with an ampersand (&) following the data type of the formal parameter AND CAN RETURN A MULTIPLE VALUES.

A

reference

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

IT IS THE ACTUAL CODE OF THE FUNCTION AND ALWAYS OUTSIDE THE main( ) FUNCTION.

A

a
FUNCTION DEFINITION

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

IT IS A SET OF INSTRUCTIONS THAT IS DESIGNED TO PERFORM A SPECIFIC TASK.

A

FUNCTIONS

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

Value returning functions are used when only [ ] result is returned and that result is used [] in an expression.

A

ONE, DIRECTLY

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

A variable declared outside of all the functions in a program.

A

GLOBAL VARIABLE

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

DOES NOT RETURN A VALUE TO ITS CALLER.

A

VOID FUNCTION

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

FUNCTIONS CREATED BY A USER.

A

USER DEFINED

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

A variable declared within a block and not accessible outside of that block. When the function ends (returns) all of its [] are destroyed.

A

local variables

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

The process in which a function calls itself is known as [ ] and the corresponding function is called the [ ] function.

A

recursion
recursive

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

A formal parameter that receives a copy of the contents of the corresponding argument (actual parameter) AND RETURNS A SINGLE VALUE

A

VALUE

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

a function declaration that does not include the body of the function.

A

FUNCTION PROTOTYPE

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

TYPES OF FUNCTION

A

PRE-DEFINED, USER DEFINED

17
Q

CAUSES THE VALUE TO BE RETURNED TO THE CALLING FUNCTION.

A

RETURN STATEMENT

18
Q

ALREADY BEEN DEFINED AS A PART OF THE LANGUAGE.

19
Q

IT IS USED WHEN INPUT/OUTPUT IS PERFORMED AND MORE THAN ONE VALUE IS TO BE RETURNED BY MODIFYING ONE OR MORE PARAMETERS RATHER THAN USING A RETURN STATEMENT.

A

VOID FUNCTION

20
Q

THESE ARE SUBPROGRAMS THAT DO NOT EXECUTE UNTIL THEY CALLED.

21
Q

A formal parameter that receives the address (location in memory) of the corresponding argument (actual parameter).