Chapter 6 -- Fill in the Blank and T/F

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

Reference variables are defined like regular variables, except there is an ______ in front of the name.

&

All static variables are initialized to -1 by default. (T/F)

False

Changes to a function parameter always affect the original argument as well. (T/F)

False

It is not possible for a function to have some parameters with default arguments and some without. (T/F)

False

The exit function can only be called from the main. (T/F)

False

Function headers are terminated with a semicolon. (T/F)

False.

When a function terminates, it always branches back to the main, regardless where it was called from. (T/F)

False.

A stub is a dummy function that is called instead of the actual function it represents. (T/F)

True

Initialization of static local variables only happen once, regardless of how many times the function in which they are defined is called. (T/F)

True

When a function with default arguments is called and an argument is left out, all arguments that come after it must be left out as well. (T/F)

True

Arguments are passed to the function parameters in the order they appear in the function call. (T/F)

True.

Function prototypes are terminated with a semicolon. (T/F)

True.

Functions should be given names that reflect their purpose. (T/F)

True.

If other functions are defined before the main, the program still starts executing at the main function. (T/F)

True.

In a function prototype, the names of the parameter variables may be left out. (T/F)

True.

Many functions may have local variables with the same name. (T/F)

True.

Overuse of global variables can lead to problems. (T/F)

True.

Static local variables are not destroyed when a function returns. (T/F)

True.

The scope of the parameter is limited to the function which uses it. (T/F)

True.

Unless you explicitly initialize global variables, they are automatically initialized to ______.

Zero

Values that are sent into a function are called ______.

arguments

The value of a default argument must be a ______.

constant

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

default

Either a functions ______ or its ______ must precede all calls to the function.

definition, prototype

The ______ function causes a program to terminate.

exit

______ variables are defined outside all functions and are accessible to any function within their scope.

global

______ variables provide an easy way to share large amounts of data among all the functions in a program.

global

The ______ is the part of a function definition that shows the function name, return type, and parameter list.

header

When a function uses a mixture of parameters with and without default arguments, the parameters with default arguments must be defined ______.

last

A ______ variable is defined inside a function and is not accessible outside the function.

local

If a function had a local variable with the same name as a global variable, only the ______ variable can be seen by the function.

local

Two or more functions may have the same name, as long as their ______ are different.

parameter lists

Special variables that hold copies of function argument are called ______.

parameters

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

prototype

Reference variables allow arguments to be passed by ______.

reference

When used as parameters, ______ variables allow a function to access the parameters original argument.

reference

The ______ statement causes a function to end immediately.

return

______ local variables retian their value between function calls.

static

When only a copy of an argument is passed to a function, it is said to be passed by ______.

value

If a function doesn't return a value, the word ______ will appear as its return type.

void


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

Minority Am Socio Quiz 1 (Chpt 1/2)

View Set

Chapter 6: Implementation and Evaluation

View Set

Section 6, section 5, Section 4, CSCM section 3, applications section 2, Applications Section 1 Exam

View Set

APUSH II TAKE HOME TEST ANSWER KEY - 150 QUESTIONS

View Set

Τροπη ευθεως λογου σε πλαγιο

View Set

Yoga ISSA: Professional Yoga Practice

View Set

Algebra 1 - Solving Linear Equations

View Set

Chapter 12 HW/QUIZZES/STUDY PLANS

View Set