What will be the output of the following Perl code (2)?

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

$val1 = 5;
$val2 = 10;

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

print "$result"
  1. 5
  2. 15
  3. 10
  4. 20

Answer: C) 10

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.