1 what is the output of the code corresponding to the following pseudocode declare m 5346746
1. what is the output of the code corresponding to the following pseudocode?
Declare M As Integer
Declare P As Integer
Set M = 2
Repeat
Set P = 1
While P
Write M + “ and “ + P
Set P = P + 1
End While(P)
Set M = M + 1
Until M > 3
Answer
A. |
2 and 3 3 and 1 |
|
B. |
2 and 1 2 and 2 2 and 3 3 and 1 3 and 2 3 and 3 |
|
C. |
1 and 1 2 and 2 3 and 3 |
|
D. |
M and P M and P M and P |
2. following steps are used to __________ two sequential files:
Open the existing files for Input
Open the new file for Output
Read the records, comparing those of the first file to the second
Write the records in order to the new file
Close all files
3. What is the industry standard for system modeling?
4. index number of the first element of an array, using the pseudocode of this textbook, is __________.
5. the function that returns the number of characters in a string is the __________ function.
6. If a two-dimensional array named Months stores the months of the year in the first column and the days of each month in the second column, which of the following represents the element that stores March 12, where March is the third month of the year?
Answer
a. months [2, 11]
b. [3, 11]
c. [3, 12]
d. [2, 12]