MCQs > IT & Programming > Perl > What is the result of the code? $pvt = Calculation(6,4,8,12); print('Result = $pvt\n'); sub Calculation{ my ($fstVar, $secndVar) = @_; my $square = sub{ return($_[0] ** 2); }; return(&$square($fstVar) + &$square($secndVar)); };

Perl MCQs

What is the result of the following code?

$pvt = Calculation(6,4,8,12);

print("Result = $pvt\n");

sub Calculation{

my ($fstVar, $secndVar) = @_;

my $square = sub{

return($_[0] ** 2);

};

return(&$square($fstVar) + &$square($secndVar));

};

Answer

Correct Answer:

Result = 52

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Perl Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Perl Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it