National_Instruments
200-500 · Question #179
What is the output of the following code: str_replace(array("Apple","Orange"), array("Orange","Apple"), "Oranges are orange and Apples are green");
The correct answer is B. Apples are orange and Apples are green. See the full explanation below for the reasoning.
Question
What is the output of the following code:
str_replace(array("Apple","Orange"), array("Orange","Apple"), "Oranges are orange and Apples are green");
Options
- AApples are orange and Oranges are green
- BApples are orange and Apples are green
- CApples are apple and Oranges are green
- DApples are apple and Apples are green
How the community answered
(62 responses)- A18% (11)
- B69% (43)
- C8% (5)
- D5% (3)
Community Discussion
No community discussion yet for this question.