Q. What will be the output of the following Perl code?

Code:
$val1 = 5;
$val2 = 10;

$result = $val1 == $val2 ? $val1 : $val2;

print "$result"
  • (A) 5
  • (B) 15
  • (C) 10
  • (D) 20
πŸ’¬ Discuss
βœ… Correct Answer: (C) 10

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
174
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Team MCQ Buddy
Publisher
πŸ“ˆ
81%
Success Rate