PrepAway - Latest Free Exam Questions & Answers

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?

PrepAway - Latest Free Exam Questions & Answers

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