CS 159 Lab 5

studied byStudied by 0 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 29

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

30 Terms

1

In downward communication it is only a copy of the data that is sent from the calling function to the called function

true

New cards
2

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

true

New cards
3

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

true

New cards
4

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

true

New cards
5

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.

true

New cards
6

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).

true

New cards
7

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.

true

New cards
8

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

true

New cards
9

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

true

New cards
10

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

true

New cards
11

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

true

New cards
12

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

false

New cards
13

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

false, not stdlib functions

New cards
14

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

true

New cards
15

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

true

New cards
16

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

true

New cards
17

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

true

New cards
18

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

true

New cards
19

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

true

New cards
20

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

true

New cards
21

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

true

New cards
22

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

false; will have the & in front of the variable

New cards
23

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).

true

New cards
24

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

false

New cards
25

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

false

New cards
26

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.

true

New cards
27

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

false; of course not

New cards
28

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.

true

New cards
29

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

true

New cards
30

& gets the address, * tells to store at that address

true

New cards

Explore top notes

note Note
studied byStudied by 6 people
888 days ago
5.0(1)
note Note
studied byStudied by 13 people
330 days ago
5.0(1)
note Note
studied byStudied by 4 people
839 days ago
5.0(1)
note Note
studied byStudied by 1 person
809 days ago
5.0(1)
note Note
studied byStudied by 1 person
58 days ago
5.0(1)
note Note
studied byStudied by 8 people
788 days ago
5.0(1)
note Note
studied byStudied by 165 people
115 days ago
4.0(1)

Explore top flashcards

flashcards Flashcard (37)
studied byStudied by 16 people
792 days ago
4.7(3)
flashcards Flashcard (130)
studied byStudied by 3 people
672 days ago
5.0(1)
flashcards Flashcard (49)
studied byStudied by 4 people
120 days ago
5.0(1)
flashcards Flashcard (88)
studied byStudied by 170 people
547 days ago
5.0(3)
flashcards Flashcard (57)
studied byStudied by 1 person
29 days ago
5.0(2)
flashcards Flashcard (77)
studied byStudied by 8 people
493 days ago
5.0(1)
flashcards Flashcard (24)
studied byStudied by 3 people
833 days ago
5.0(1)
flashcards Flashcard (163)
studied byStudied by 185 people
421 days ago
5.0(1)
robot