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?
start
Declarations
string author
num SIZE
string STOCKEDAUTHORSSIZE "Christie", "Davis", "Dexter", "Doyle", "Grimes"
num index
string matchFound
matchFound No
index
output "Enter the last name of the desired author:
input author
while index SIZE
if author STOCKEDAUTHORSindex then
matchFound "Yes"
output "Good news: Books by author, "are available."
endif
index index
endwhile
if matchFound No then
output "Sorry, but we dont stock books by author
endif
stop
Group of answer choices
This program will compare each element in STOCKEDAUTHORS with the variable author.
The loop that begins on line will exit when the users desired author is found in the array.
This program will perform a binary search.
Line 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
