ITSC Chapter 6

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

These types of arguments are passed to parameters automatically if no argument is provided in the function call.

Default

A(n) ________ is information that is passed to a function, and a(n) ________ is information that is received by a function.

argument, parameter

Functions are ideal for use in menu-driven programs. When a user selects a menu item, the program can ________ the appropriate function.

call

A function ________ contains the statements that make up the function.

definition

Look at the following function prototype. int myFunction(double); What is the data type of the function's parameter variable?

double

When used as parameters, these types of variables allow a function to access the parameter's original argument.

reference

The value in this type of local variable persists between function calls.

static

This is a dummy function that is called instead of the actual function it represents.

stub

True/False: A function's return data type must be the same as the function's parameter(s).

False

True/False: A local variable and a global variable may not have the same name within the same program.

False

A function is executed when it is:

called

It is a good programming practice to ________ your functions by writing comments that describe what they do.

document

This function causes a program to terminate, regardless of which function or control mechanism is executing.

exit()

If a function is called more than once in a program, the values stored in the function's local variables do not ________ between function calls.

persist

A function ________ eliminates the need to place a function definition before all calls to the function.

prototype

The value in a ________ variable persists between function calls.

static local

This is a statement that causes a function to execute.

function call

Look at the following function prototype. int myFunction(double, double, double); How many parameter variables does this function have?

3

Which of the following statements about global variables is true?

A global variable can have the same name as a variable that is declared locally within a function.

True/False: When a function is called, flow of control moves to the function's prototype.

False

True/False: A parameter is a special-purpose variable that is declared inside the parentheses of a function definition.

True

True/False: It is possible for a function to have some parameters with default arguments and some without.

True

________ functions may have the same name, as long as their parameter lists are different.

Two or more

Here is the header for a function named computeValue: void computeValue(int value) Which of the following is a valid call to the function?

computeValue(10);

In a function header, you must furnish:

data type(s) of the parameters, data type of the return value, the name of function, names of parameter variables

A ________ argument is passed to a parameter when the actual argument is left out of the function call.

default

A collection of statements that performs a specific task.

function

A ________ variable is declared outside all functions.

global

If a function does not have a prototype, default arguments may be specified in the function ________.

header

This type of variable is defined inside a function and is not accessible outside the function.

local

A function can have zero to many parameters, and it can return this many values.

only one

This statement causes a function to end.

return


संबंधित स्टडी सेट्स

SOCIAL STUDIES - CHAPTER 6 / LESSON 2

View Set

High-Risk Antepartum + IPV Olds Maternal Newborn Nursing

View Set

BA Chapter 4, MIE CH 4 Smartbook, Chapter 4, Exploring Business: Chapter 4, Ch. 5 Understanding Business: How to Form a Business, Business Chapter 5 test, Chapter 4 Smartbook, Intro To Business, Chapter 3 concepts of business, BUS 100 CH. 3 business...

View Set

HW 11: Overview of Nervous System

View Set