Consider the following program code
package Dog;
$string = “Walk the dog.”;
if($string eq “Walk the dog.”)
{
package Cat;
$string = “Pet the cat.”;
print(“$string\n”);
}
print (“$string\n”);
What is the result of executing this program code?
A.
The code will output the following
Pet the cat.
Pet the cat.
B.
The code will output the following
Walk the dog.
Walk the dog.
C.
The code will output the following
Pet the cat.
Walk the dog.
D.
The code will output the following
Walk the dog.
Pet the cat.
C