What is the result of executing this program code?

Consider the following program code
%color – (“sun” => “yellow”, “apple” -> “red”);
reverse(%color);
@colorKeys – sort (keys(%color));
foreach(@colorKeys)
{
print($color{$_} . ” “);

}
What is the result of executing this program code?

Consider the following program code
%color – (“sun” => “yellow”, “apple” -> “red”);
reverse(%color);
@colorKeys – sort (keys(%color));
foreach(@colorKeys)
{
print($color{$_} . ” “);

}
What is the result of executing this program code?

A.
The code will output the following
apple sun

B.
The code will output the following
sun apple

C.
The code will output the following
red yellow

D.
The code will output the following
apple red sun yellow



Leave a Reply 2

Your email address will not be published. Required fields are marked *


jshrulez

jshrulez

C
red yellow
[verified]