M07 Evaluate: Quiz SDEV120 Computer Logic

1 September 2022
4.7 (114 reviews)
23 test answers

Unlock all answers in this set

Unlock answers (19)
question
How many storage locations are allocated by the statement Declare A[4,9] As Integer?
answer
36
question
The Declare statement allocates __________ storage locations to the array named Photos[23
answer
23
question
The random function in RAPTOR returns a number in the range 0.0 up to but not including _______
answer
1.0
question
The length of the string called MyName which contains the name "Arnold" is _________.
answer
6
question
The __________ operator is used to join two strings.
answer
concatenation
question
Given an array named Stuff, how many elements will be filled with the following loop? For (K = 0; K <= 9; K+2) Set Stuff[K] = K End For
answer
5
question
The __________ function will return the number of characters in a given string.
answer
Length_Of()
question
A variable that is used to indicate whether a certain action has taken place is called a(n) _________.
answer
flag
question
Given the following pseudocode, what is stored in Puppy[3]? Declare Puppy[12] As Character Set Puppy = "ROVER"
answer
E
question
The following statement: Declare ArrayX[5,5] allocates storage space for __________ elements.
answer
25
question
What is displayed if the following pseudocode is coded and run? (Note: if there are any spaces, it is assumed to be one space.) Declare Name As String Declare NameLength As Integer Set Name = "Peter Pan" Set NameLength = Length_Of(Name) Write NameLength
answer
9
question
What will be displayed after code corresponding to the following pseudocode is run? Declare MyName[25] As Character Set MyName = "Harry5" Write Length_Of(MyName)
answer
6
question
The first element of an array in most programming languages is referred to with the index number of_______ although some may use__________ as the first index value. (Note: this question has 2 parts; you must answer each part correctly to receive full marks.)
answer
0 1
question
In parallel arrays, corresponding elements in each array must have the same __________.
answer
subscript
question
Complete the following program segment that displays the number of letters in the person's first name. Declare First[ ] As Character Declare FullName[25] As Character Declare K, Lgth As Integer Set K = 0 While (FullName[K] != " ") Set First[K] = FullName[K] Set K = K + 1 End While Set Lgth = Length_Of(First) Write "The number of letters in the first name is " + __________
answer
Lgth
question
Arrays can reduce the number of __________ needed in a program because a single array instead of a collection of simple variables to store related data.
answer
variables
question
The fourth element of an array named Colors is identified in pseudocode as Colors[___]
answer
3
question
The random function in RAPTOR returns a number in the range 0.0 up to but not including _______.
answer
10
question
Arrays are stored in a computer's memory in a sequence of ______________ storage locations.
answer
consecutive
question
Each __________ is an item in the array an has its own value.
answer
element
question
What is the first output corresponding to the following pseudocode? The first output is _________. Declare G[100] Set N = 4 For (J = 0; J <= N; J++) Set G[J] = J * 4 End For Write G[N/2] Write G[1] + " " + G[N-1]
answer
8
question
If we know that 100 elements have been allocated to a two-dimensional array named Students intended to hold 5 sets of test scores per student, what is the best way to declare the array? Declare Students[____, 5]
answer
20
question
The first element of an array in most programming languages is referred to with the index number__________ of although some may use___________ as the first index value. (Note: this question has 2 parts; you must answer each part correctly to receive full marks.)
answer
0 1