![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 06.12.2021 17:50 AdityaMathur
The procedure below is intended to display the index in a list of unique names(nameList) where a particular name(targetName) is found. If targetName is not found in nameList, the code should display 0.
PRoCEDURE FindName (nameList, targetName)
{
index<-- 0
for EACH name IN nameList
{
index <-- index + 1
IF (name = targetName)
{
foundIndex <--- Index
}
ELSE
{
foundIndex <-- Index
}
ELSE
foundIndex<-- 0
}
}
DISPLAY (foundIndex)
}
Which of the following procedure calls can be used to demonstrate that the procedure does NoT work as intended?
a. FindName(["Andrea", "Ben"], "Ben")
b. FindName(["Andrea", "Ben"], "Diane)
c. FindName(["Andrea", "Ben", "Chris"], "Ben")
d. FindName(["Andrea", "Chris", "Diane"], "Ben")
![ansver](/tpl/images/cats/User.png)
Answers: 2
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 21.06.2019 22:50, savagesquid4807
Before you enter an intersection on a green light make sure
Answers: 2
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 18:00, deathfire5866
Determine whether the following careers would require training or college.
Answers: 1
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 09:30, caromaybelline71
Write an essay on online collaboration, how to do it, the challenges, resolving the challenges, and consider whether the risks are greater than rewards. ( need )
Answers: 1
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 22:30, reaganphelps3
What would be the address of the cell, which is at the intersection of the second row and the third column in a worksheet?
Answers: 1
You know the right answer?
The procedure below is intended to display the index in a list of unique names(nameList) where a par...
Questions in other subjects:
![Konu](/tpl/images/cats/en.png)
English, 31.01.2020 02:43
![Konu](/tpl/images/cats/obshestvoznanie.png)
![Konu](/tpl/images/cats/mkx.png)
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/fizika.png)
Physics, 31.01.2020 02:43
![Konu](/tpl/images/cats/health.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 31.01.2020 02:43
![Konu](/tpl/images/cats/en.png)
![Konu](/tpl/images/cats/istoriya.png)
History, 31.01.2020 02:43