Exam 2: Functions and Control Structures

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Variable scope refers to the location that a declared variable can be used.

Free
(True/False)
4.9/5
(45)
Correct Answer:
Verified

True

A command block is a group of statements within a set of opening and closing ____.

Free
(Multiple Choice)
4.9/5
(39)
Correct Answer:
Verified

B

You must use the ____________________ keyword to declare a global variable within the scope of a function.

Free
(Short Answer)
4.9/5
(42)
Correct Answer:
Verified

global

A function ____________________ executes a function

(Short Answer)
4.8/5
(36)

An if statement that includes an else clause is called a(n) ____________________ statement.

(Short Answer)
4.8/5
(36)

Functions are placed within parentheses that follow a parameter name.

(True/False)
4.8/5
(30)

A function must contain a parameter.

(True/False)
4.7/5
(34)

A ____________________ variable is declared inside a function and is only available within the function in which it is declared.

(Short Answer)
4.9/5
(45)

A ____________________ variable is declared outside a function and is available to all parts of the program.

(Short Answer)
4.8/5
(35)

To ensure that the while statement will eventually end, you must include code within the body of the while statement that changes the value of the conditional expression.

(True/False)
4.9/5
(42)

When one decision-making statement is contained within another decision-making statement, they are called ____________________ decision-making structures.

(Short Answer)
4.7/5
(36)

A ____________________ is a variable that increments or decrements with each iteration of a loop statement.

(Short Answer)
4.8/5
(39)

The ____ file is typically saved with a prefix of inc_.

(Multiple Choice)
4.8/5
(27)

The switch statement controls program flow by executing a specific set of statements, depending on the value of an expression.

(True/False)
4.8/5
(33)

The default label contains statements that execute when the value returned by the switch statement expression does not match any case label.

(True/False)
5.0/5
(41)

The ____________________ statement generates a warning if the include file cannot be found.

(Short Answer)
4.9/5
(39)

A function definition contains the lines of code that make up a function.

(True/False)
4.8/5
(36)

A return statement is a statement that returns a value to the statement that called the function.

(True/False)
4.8/5
(40)

The formal parameters within the parentheses of a function declaration are global variables.

(True/False)
4.9/5
(39)

Like variables, function names are case sensitive.

(True/False)
4.9/5
(32)
Showing 1 - 20 of 83
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)