CS 159 Lab 4

40 flashcardsby Rusty
Study these flashcardsFree · spaced repetition · iPhone, Android, Mac & web

All cards

1
The function call is an executable statement.
T
2
The function declaration requires the data types and identifiers for each parameter.
F
3
The function declaration requires the data types for each parameter. (Including the identifiers are optional)
T
4
The function call requires the data types and identifiers for each parameter.
F
5
The function call requires the identifiers for each parameter.
T
6
The first line of the function definition requires the data types and identifiers for each parameter.
T
7
The function definition contains executable statements that perform the task of the function.
T
8
The first line of the function definition terminates with a semicolon (;).
F
9
The first line of the function definition does not terminate with a semicolon (;).
T
10
The value of a local variable may be returned through a return statement of a user-defined function
T
11
Parameters are defined as local variables in the function header (the first line of the function definition) and should not be re-defined within the local declaration section of the function.
T
12
Additional local variables can be defined in the local declaration section of a function.
T
13
A local variable cannot be referenced through its identifier outside of the function in which it is defined.
T
14
A variable declared in the local declaration section of a function can have the same identifier as one of the parameters of the same function.
F
15
A variable declared in the local declaration section of a function cannot have the same identifier as one of the parameters of the same function.
T
16
Individual tasks in a program must be factored into individual user-defined functions.
T
17
One benefit of user-defined functions is the potential reduction or elimination of duplicate code.
T
18
A function assignment header for every user-defined function must be inserted immediately above the definition of the function it is documenting.
T
19
Parameters being received by a function will be commented to the right of where they are defined.
F
20
Parameters being received by a function will not be commented to the right of where they are defined.
T
21
The return statement cannot contain an expression.
F
22
The return statement can contain an expression.
T
23
Data sent from the calling function to the function being called will be received in the same order in which it was passed.
T
24
The individual task represented by a function should be testable apart from the rest of the program.
T
25
The sequence in which the statements are executed in a program can be altered through the use of functions and function calls.
T
26
A user-defined function may be called more than once in a program.
T
27
The control of the program always returns from the called function to the main function.
F
28
The control of the program will not always return from the called function to the main function if a function is calling another function within its own function.
T
29
A function may return at most one value.
T
30
The role of the main function is to coordinate the function calls and to establish the data needs for a program.
T
31
Data sent from the calling function to the function being called will be received in the same order in which it was passed.
T
32
A local variable can be referenced through its identifier outside of the function in which it is defined.
F
33
Parameters are defined as local variables in the function header (the first line of the function definition) and should not be re-defined within the local declaration section of the function.
T
34
The first line of the function definition terminates with a semicolon (;).
F
35
The function call requires the data types and identifiers for each parameter.
F
36
A function will always return exactly one value.
F
37
A user-defined function may be called more than a single time in a program.
T
38
The void in the following declaration statement would be optional: void printData(int, int, int);
F
39
Individual tasks in a program may be factored into individual user-defined functions or retained within the main function when an additional user-defined function would be burdensome.
F
40
The value of a local variable may be shared with the calling function through a return statement of a user-defined function.
T
Study all 40 cards for free

More Computer science flashcards

CS 320 WEB TECHNOLOGIES & FRAMEWORKS18 cardsComputer science · EnglishElijahCPS 356 Operating Systems13 cardsComputer science · EnglishAJNetwork Security (NETSEC)310 cards · 1 addedComputer science · EnglishEdsonSecurity+ (SY0-601) Acronym List352 cardsComputer science · EnglishsvenSecurity, Ethics and Privacy in Information Systems97 cardsComputer science · English—Griffith—Software Development: Reliability and Sociotechnical Systems75 cardsComputer science · EnglishDiandreiA+ Core 1 Required Memorization61 cardsComputer science · EnglishatalnagiSection 4 -Exhanging data52 cardsComputer science · EnglishDsoboBusiness operations43 cardsComputer science · English17Lecture 2 + Lecture 2 (IDK)37 cardsComputer science · EnglishAmoghMicro 4 Yu31 cardsComputer science · EnglishDiandreiIT 276 Final25 cardsComputer science · Englishargord2

All Computer science decks

Study these decks in the app

Free on iPhone, Android, Mac and the web. Add any deck to your account in one tap.

Download on the App StoreGet it on Google Play
Study all 40 cards for free