Question: Which statement about the following pseudocode is correct? 1 start 2 Declarations 3 string author 4 num SIZE = 5 5 string STOCKED _ AUTHORS

Which statement about the following pseudocode is correct?
1 start
2 Declarations
3 string author
4 num SIZE =5
5 string STOCKED_AUTHORS[SIZE]= "Christie", "Davis", "Dexter", "Doyle", "Grimes"
6 num index
7 string matchFound
8 matchFound ="No"
9 index =0
10 output "Enter the last name of the desired author: "
11 input author
12 while index < SIZE
13 if author = STOCKED_AUTHORS[index] then
14 matchFound = "Yes"
15 output "Good news: Books by ", author, "are available."
16 endif
17 index = index +1
18 endwhile
19 if matchFound ="No" then
20 output "Sorry, but we dont stock books by ", author
21 endif
22 stop
Group of answer choices
This program will compare each element in STOCKED_AUTHORS with the variable author.
The loop that begins on line 12 will exit when the users desired author is found in the array.
This program will perform a binary search.
Line 9 of this program will initialize a flag variable.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!