CS 159 FINAL

studied byStudied by 0 people
0.0(0)
Get a hint
Hint

T/F: All functions that utilize passing parameters by address must be void.

1 / 106

encourage image

There's no tags or description

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

107 Terms

1

T/F: All functions that utilize passing parameters by address must be void.

F

New cards
2

T/F: Data sent from the calling function to the function being called will be received in the same order in which it was passes.

T

New cards
3

T/F: The number of parameters cannot be determined from the declaration of a function.

F

New cards
4

Does fetching data access computer memory?

Yes

New cards
5

Does writing data access computer memory?

Yes

New cards
6

Does processing data access computer memory?

No

New cards
7

COURSE STANDARD? The declaration section and execution sections of a user- defined function must never overlap.

Yes

New cards
8

COURSE STANDARD? Attempt to minimize your use of literal constants and maximize your use of symbolic constants.

Yes

New cards
9

COURSE STANDARD? Place a single space between all operators and operands.

Yes

New cards
10

T/F: A structure chart should be more horizontal and less vertical because the main function should make a majority of the user- defined function calls.

F

New cards
11

T/F: Functions from standard C libraries such as math.h and stdio.h are not included on a structure chart.

F

New cards
12

T/F: It is possible to determine from a structure chart the order in which use-defined functions are called in a program.

F

New cards
13

T/F: Symbolic/ defined constants do not have a data type, but the values they represent do.

T

New cards
14

T/F: The assignment operator is not used to associate a value with an identifier as no memory is requires for symbolic/ defined constant.

T

New cards
15

T/F: No terminal semicolon is used when defining a symbolic/ defined constant as the define instruction is a pre-processor directive.

T

New cards
16

T/F: A mixed type expression will require at least one type conversion before the expression can be evaluated.

T

New cards
17

T/F: Only implicit type conversions can be used to change a mixed type expression to a single type expression.

F

New cards
18

T/F: An explicit type conversion cannot be applied to a symbolic/defined constant because such a constant does not have a data type.

F

New cards
19

T/F: It takes less time to access those levels of memory that are lower on the hierarchy than those that are higher.

F

New cards
20

T/F: The capacity of those levels of memory that are lower on the hierarchy is greater than those that are higher.

F

New cards
21

T/F: The memory at lower levels on the hierarchy are closer to the CPU than those that are higher.

F

New cards
22

T/F: An error related to a floating exception or segmentation fault can be detected by the compiler.

F

New cards
23

T/F: A logical error cannot be detected by the compiler.

T

New cards
24

T/F: A warning issued by the compiler will not prevent the creation of a new executable file.

T

New cards
25

T/F: A user defined function can return at most one value.

T

New cards
26

T/F: Control of a program is always returned from the called function to the calling function when the called function terminated.

T

New cards
27

T/F: One user defined function cannot call another user defined function.

F

New cards
28

T/F: The user defined functions will be declared with a local scope in your programs.

F

New cards
29

T/F: According to course standards a variable will never be permitted to define with a global scope.

T

New cards
30

T/F: It is not possible to reuse an identifier when the two objects that will share the identifier do not have an overlapping scope.

F

New cards
31

DEFINITON: Functionally cohesive

Called function accomplished only a single task in the program.

New cards
32

T/F: It is not possible to use a single scanf statement to accept input for multiple variables.

F

New cards
33

T/F: It is not possible to format output with left-alignment when using a printf.

F

New cards
34

T/F: It is not possible to write a scanf statement that does not make use of its address list

T

New cards
35

T/F: The parameter of the feof function is a file handle variable.

T

New cards
36

T/F: The value returned from the fopen function is used to initialize a file handle variable.

T

New cards
37

T/F: The name of the external file is tha parameter to the fclose function.

F

New cards
38

T/F: When the file handle variable stores a file ID value equal to -1 it means the external file failed to open as expected.

T

New cards
39

T/F: The value returned from the fscanf function is the data value that was read from the external file.

T

New cards
40

T/F: The feof function will return a zero when the end of the file has been reached.

F

New cards
41

Why is the "gets" function considered to be dangerous to the compiler?

The input of the user may exceed the defined size of the array.

New cards
42

T/F: A warning issued by the compiler will not prevent the creation of a new file executable.

T

New cards
43

T/F: An error in the logic of the program cannot be detected by the compiler.

T

New cards
44

T/F: An segmentation fault can be detected by the compiler.

F

New cards
45

T/F: A structure chart should be more horizontal and less vertical because the main function should make a majority of the user- defined function calls.

T

New cards
46

T/F: Functions from standard C libraries such as math.h and stdio.h are not included on a structure chart.

T

New cards
47

T/F: It is impossible to determine from a structure chart the order in which user-defined functions are called in a program.

F

New cards
48

T/F: Symbolic/ defined constants don’t have a data type, but the values that they represent do.

T

New cards
49

T/F: The assignment operator is not used to associate a value with an identifier as no memory is required for a symbolic/ defined constant.

T

New cards
50

T/F: No terminal semicolon is used when defining a symbolic/ defined constant as the define instruction is a pre-processor directive.

T

New cards
51

T/F: No two case labels can represent the same constant value.

T

New cards
52

T/F: Each case label is the keyword case followed by a constant expression.

T

New cards
53

T/F: Only a single executable statement can be associated with any given case.

F

New cards
54

T/F: The user defined functions will be declared with in the local declaration section in your programs this semester.

F

New cards
55

T/F: According to course standards a variable will be permitted to be defined with a global scope.

F

New cards
56

T/F: It is possible to reuse an identifier when the two objects that will share the identifier do not have an over lapping scope.

T

New cards
57

T/F: The number of times the loop control expression is evaluated equals the number of iterations in a post- test loop.

T

New cards
58

T/F: The initialization of the loop control variable may take place inside of the body in a post test loop.

T

New cards
59

T/F: The update action for the loop control variable may be a part of the loop control expression.

T

New cards
60

T/F: The short circuit methon is applied onlt to logical expression in if/else if conditions.

F

New cards
61

T/F: The short circuit method is not applied to logical operators used as loop control expressions.

F

New cards
62

T/F: The short circuit method is applied to all logical expressions that use a logical operator.

T

New cards
63

T/F: The function definition requires the data types and identifiers for each parameter

F

New cards
64

T/F: The function call requires the data types and identifiers for each parameter.

F

New cards
65

T/F: The first line of the function definition requires the data types and identifiers for each parameter.

T

New cards
66

T/F: A user defined function should not be designed such that it completes multiple tasks in a program.

T

New cards
67

T/F: The use of a user defined function should eliminate the need for the same logic to appear in more than one location of a program.

T

New cards
68

T/F: Each user defined function should be testable apart from the rest of the program.

T

New cards
69

T/F: The control of the program always returns from the calling function to the main function.

F

New cards
70

T/F: Data sent from the calling function to the function being called will be received in the same order which it was passed.

T

New cards
71

T/F: The return statement cannot contain an expression.

F

New cards
72

T/F: Both implicit type conversions and assignment conversions in an expression will not result in a loss of data as a result of the conversion.

F

New cards
73

T/F: When evaluating a mathematical operator with operands of different types it is the lower ranked data type that is converted to that of the higher data type.

T

New cards
74

T/F: Converting a higher ranked data type to that of a lower ranked data type may result in the loss of data.

T

New cards
75

T/F: A symbolic/ defined constant may be created anywhere in the program.

F

New cards
76

T/F: Within each function the local declarations and executable statements must never be permitted to overlap.

F

New cards
77

T/F: Variable and function declarations will never be permitted in the global section this semester.

F

New cards
78

T/F: The flag attribute of a placeholder within the format string of a printf statement can be used to shift the alignment from right to left when making use of a width modifier.

T

New cards
79

T/F: The width and precision modifier attributes of a placeholder within the format string of a printf statement cannot be represented by variables and must always be constant values.

F

New cards
80

T/F: The precision modifier when used in the format string of a printf statement can specify the number of digits to display on both sides of the decimal point of a floating point value.

F

New cards
81

T/F: The order in which the function definitions appear in a program must match the order in which they are declared.

F

New cards
82

T/F: The order in which the function declarations appear in a program must match the order in which they are defined.

F

New cards
83

T/F: The order in which function definitions appear must match the order in which they are called.

F

New cards
84

Which classification of languages was developed to be independent of the specific of hardware of which it may be used?

High-level programming languages

New cards
85

T/F: The return type of any function that makes use of passing parameters must be void.

F

New cards
86

T/F: When passing multiple parameters to a function if one parameter is to be passed by address then all of the parameters should be passed by address.

F

New cards
87

T/F: Use of parameter passing by address permits multiple tasks of a programming problem to be consolidated into a single -user defined function

F

New cards
88

T/F: The short circuit method of evaluating logical expressions is limited only to those logical expressions used in selection constructs.

F

New cards
89

T/F: The short circuit method of evaluating logical expressions is limited to only those logical expressions used in repetition constructs.

F

New cards
90

T/F: The short circuit method of evaluating logical expressions is limited only to those logical expressions used in assignment operators.

F

New cards
91

T/F: The use of { and } with if/else constructs is options when not required by the compiler.

F

New cards
92

T/F: All code found inside of the body of if/else constructs must be indented two additional spaces.

T

New cards
93

T/F: The body of any if, else it, or else should never remain empty.

T

New cards
94

T/F: The use of recursion should be limited to counter-controlled processes.

T

New cards
95

T/F: The use of the for loop should be limited to counter-controlled processes.

T

New cards
96

T/F: The use of the do while loop should be limited to event-controlled processes.

F

New cards
97

T/F: When the base case is reached the control of the program will immediately return to main.

F

New cards
98

T/F: An infinite number of recursive function calls will result in an identical behavior of an infinite loop.

T

New cards
99

T/F: The return type of a recursive function may be void.

T

New cards
100

T/F: Two case statements cannot represent the same constant value.

T

New cards

Explore top notes

note Note
studied byStudied by 5 people
... ago
5.0(1)
note Note
studied byStudied by 2 people
... ago
5.0(1)
note Note
studied byStudied by 85 people
... ago
5.0(1)
note Note
studied byStudied by 16 people
... ago
5.0(1)
note Note
studied byStudied by 8 people
... ago
5.0(1)
note Note
studied byStudied by 153 people
... ago
5.0(3)
note Note
studied byStudied by 73 people
... ago
5.0(3)
note Note
studied byStudied by 8175 people
... ago
4.8(29)

Explore top flashcards

flashcards Flashcard (57)
studied byStudied by 105 people
... ago
5.0(1)
flashcards Flashcard (40)
studied byStudied by 25 people
... ago
5.0(1)
flashcards Flashcard (104)
studied byStudied by 29 people
... ago
4.7(3)
flashcards Flashcard (38)
studied byStudied by 5 people
... ago
5.0(2)
flashcards Flashcard (20)
studied byStudied by 8 people
... ago
5.0(1)
flashcards Flashcard (24)
studied byStudied by 31 people
... ago
5.0(1)
flashcards Flashcard (66)
studied byStudied by 8 people
... ago
4.5(2)
flashcards Flashcard (131)
studied byStudied by 14 people
... ago
5.0(1)
robot