Exam 2: Functions and Control Structures

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

The ____________________ statement repeats a statement or series of statements as long as a given conditional expression evaluates to TRUE.

(Short Answer)
4.8/5
(37)

In a(n) ____________________ loop, a loop statement never ends because its conditional expression is never FALSE.

(Short Answer)
4.9/5
(40)

When one decision-making statement is contained within another decision-making statement, they are referred to as multiple decision-making structures.

(True/False)
4.9/5
(32)

The switch statement compares the value of an expression to a value contained within a special statement called a ____________________.

(Short Answer)
4.9/5
(40)

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

(Multiple Choice)
4.7/5
(28)

What will be returned if you use a local variable outside the function in which it is declared?

(Multiple Choice)
4.8/5
(33)

Each repetition of a looping statement is called a(n) ____________________.

(Short Answer)
4.7/5
(34)

In a foreach statement, you use the $variable_name ____________________ to access the value of the element that is available in an iteration.

(Short Answer)
4.9/5
(39)

You will not receive an error if you attempt to use a foreach statement with any variable types other than arrays.

(True/False)
4.7/5
(31)

A ____ statement is used to iterate or loop through the elements in an array.

(Multiple Choice)
4.9/5
(39)

With the ____________________ statement the program assure that the file is added to the script only once and halts the processing of the web page and displays an error message if the include file cannot be found.

(Short Answer)
4.8/5
(32)

If you attempt to use a local variable outside the function in which it is declared, you receive an error message.

(True/False)
5.0/5
(48)

A switch statement contains the following components: the keyword switch, an expression, an opening brace, a case label, the executable statements, the keyword ____________________, a default label, and a closing brace.

(Short Answer)
4.9/5
(34)

A formal ____________________ is a variable that is used within a function.

(Short Answer)
4.9/5
(39)

You must include a(n) ____________________ to separate each section in a for loop.

(Short Answer)
4.7/5
(40)

The else clause can only be used with an if statement.

(True/False)
4.8/5
(38)

One of the primary differences between the while statement and the for statement is that in addition to a conditional expression, the for statement can also include code that initializes a counter and changes its value with each iteration.

(True/False)
4.8/5
(35)

case "Monday" is an example of a ____________________ data type being used as a case label.

(Short Answer)
4.9/5
(49)

The parameters within the parentheses of a function declaration are what kind of variables?

(Multiple Choice)
4.8/5
(39)

If you do not include code that changes the value used the by the condition expression, your program will be caught in a ____ loop.

(Multiple Choice)
4.9/5
(40)
Showing 41 - 60 of 83
close modal

Filters

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