Test 2 - fill in the blanks Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

a variable that is known only within the function in which it is defined is called

A

local variables

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

The _____ statement in a called function is used to pass the value of an expression back to the calling function.

A

return

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

Keyword _____ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.

A

void

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

The _____ of an identifier is the portion of the program in which the identifier can be used.

A

scope

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

The three ways to return control from a called function to a caller are _____, _____, and ______.

A

return, return expression and encountering the closing right brace of a function

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

A(n) allows the compiler to check the number, types, and order of the arguments passed to a function.

A

function prototype

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

The _____ function is used to produce random numbers.

A

rand

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

The _____ function is used to set the random number seed to randomize a program.

A

srand

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

The _____ storage-class specifiers are _____ , _____ , _____ and .

A

auto, register, extern, static.

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

Variables declared in a block or in the parameter list of a function are assumed to be of storage class _____ unless specified otherwise.

A

auto

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

A non-static variable defined outside any block or function is a(n) _____ variable.

A

external, global

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

For a local variable in a function to retain its value between calls to the function, it must be declared with the _____ storage-class specifier.

A

static

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

The four possible scopes of an identifier are _____ , _____, _____and _____.

A

Function scope, file scope, block scope, function prototype scope.

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

A function that calls itself either directly or indirectly is a(n) _____ function.

A

recursive

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

A recursive function typically has two components: one that provides a means for the recursion to terminate by testing for a(n) _____ case, and one that expresses the problem as a recursive call for a slightly simpler problem than the original call.

A

base

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

Counter-controlled iteration is also known as ______ iteration because it’s known in advance how many times the loop will be executed

A

definite

17
Q

Sentinel-controlled iteration is also known as _____ iteration because it’s not known in advance how many times the loop will be executed

A

indefinite

18
Q

In counter-controlled iteration, a(n) _________ is used to count the number of times a group of instructions should be repeated

A

counter

19
Q

The ______ statement, when executed in an iteration statement, causes the next iteration of the loop to be performed immediately

A

continue

20
Q

The ______statement, when executed in an iteration statement or a switch, causes an immediate exit from the statement

A

break

21
Q

The ______ is used to test a particular variable or expression for each of the constant integral values it may assume

A

switch selection statement