What is the result of executing this program code?

Consider the following program code
$Animal – “Dogs bark”;
package Cat;
$Animal = “Cats purr”;
{
package Fish;
$Animal – “Fish swim”;
}
package main;
print $Animal;
What is the result of executing this program code?

Consider the following program code
$Animal – “Dogs bark”;
package Cat;
$Animal = “Cats purr”;
{
package Fish;
$Animal – “Fish swim”;
}
package main;
print $Animal;
What is the result of executing this program code?

A.
The code will fail at line 4.

B.
The code will output the following Dogs bark

C.
The code will output the following Cats purr

D.
The code will output the following Fish swim



Leave a Reply 0

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