CS 159 Lab 5 True or False

Ace your homework & exams now with Quizwiz!

A structure chart should be created after your program has been written.

.F

A function that passes at least one parameter by address must pass them all by address.

F

All functions that utilize pass by address must be void functions.

F

Each rectangle on a structure chart represents the user-defined and standard library functions used in a program.

F

It is never possible to determine if any parameters are passed to a function by address from an example call to the function.

F

With the use of pass by address it is now permissible for a function to be written to complete several subtasks of the program.

F

A function that does one and only one process is functionally cohesive.

T

A function that passes at least one parameter by address does not pass them all by address.

T

A structure chart may show the data that is exchanged between functions.

T

A structure chart should be created before your program has been written.

T

A variable declared in the local declaration section of a function has a scope that extends until the end of that function.

T

All functions that utilize pass by address may not always be void functions based on whatever value the user wants to be returned (it could be a different variable being returned and not the one being passed by address).

T

Each rectangle on a structure chart represents the user-defined functions used in a program.

T

Functional cohesion is a measure of how closely the processes in a function are related.

T

Given the address of a variable the called function can access and manipulate the value of a variable in the calling function.

T

In downward communication (passing by value) it is only a copy of the data that is sent from the calling function to the called function.

T

It is a good design practice to design a user-defined function such that it is testable apart from the rest of the program.

T

It is a good design practice to limit user-defined functions to only a single task.

T

It is a good design practice to not repeat the logic of one function in other functions of the program.

T

It is not possible to access a variable in the calling function by its identifier when inside the called function.

T

It is poor programming style to reuse identifiers within the same scope.

T

It is possible to determine if any parameters are passed to a function by address based on the first line of the definition of the function (also known as the function header).

T

It is possible to determine if any parameters are passed to a function by address from an example call to the function using the address operator.

T

It is possible to determine if any parameters are passed to a function by address from the declaration statement of the function.

T

No code is contained in a structure chart as it only demonstrates the function flow of the program.

T

Objects with a global scope are visible (defined) everywhere in the program.

T

One benefit of pass by address is that it allows multiple changes to be made in a function and to have those changes available in the calling function.

T

The * and & operators are inverse operations of each other.

T

The asterisk (*) when used in a variable declaration indicates that such variables are not data variables but address (pointer) variables which can store the addresses of other variables in the program.

T

The asterisk has two different uses, declaring an address variable (pointer) and indirectly accessing the data (in the memory location to which the variable points).

T

The called function must declare a special type of variable known as a pointer to store a memory address that is sent from the calling function.

T

The scope of an object determines the region of the program in which it is visible (and defined).

T

To obtain the address of a variable use the address operator (&).

T

When only one data item needs to be returned to the calling function then we should use the standard return statement rather than passing a single parameter by address.

T

When working with a parameter that has been passed by address it is unnecessary to use the & (address) operator in the scanf because the parameter already represents a memory location.

T

With the use of pass by address it is still not permissible for a function to be written to complete several subtasks of the program.

T


Related study sets

BT1 - Final Exam [Chapter 1 - Chapter 5]

View Set

Define the terms culture and cultural norms (SAQ)

View Set

Writing and Graphing Equations in Two Variables

View Set

FIN205 Topic 7: Valuation of intangible assets

View Set

The First Voyage around the World: Reviewer

View Set