ExamGecko
Question list
Search
Search

Question 160 - FC0-U61 discussion

Report
Export

A developer is troubleshooting code in an application. The code is supposed to return the word "vegetables" if the category id is only 2. However the code is returning vegetables for all values except category id 1. Which of the following code statements would BEST correct the issue?

A.
If category id = 1 then 'Fruit' Else 'Vegetables'
Answers
A.
If category id = 1 then 'Fruit' Else 'Vegetables'
B.
If category id = 1 then 'Fruit' Else 'Vegetables'
Answers
B.
If category id = 1 then 'Fruit' Else 'Vegetables'
C.
If category id <> 1 then 'Vegetables' Else 'Fruit'
Answers
C.
If category id <> 1 then 'Vegetables' Else 'Fruit'
D.
If category id = 1 then 'Fruit' Else if category id >= 2 then 'Vegetables' Else 'Candy'
Answers
D.
If category id = 1 then 'Fruit' Else if category id >= 2 then 'Vegetables' Else 'Candy'
Suggested answer: B
asked 02/10/2024
Conceicao Damasceno
34 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first