aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Perl Programming Fundamentals
  • What is the value of @list at the end of the following pr...
Multiple choice technology programming languages

What is the value of @list at the end of the following program? #!/usr/local/bin/perl @list=(1,2.3); &testsub(*list); Sub testsub{ Local (*sublist)=@_; $sublist[1] = 5; }

  1. (1,2.3)

  2. (1,5,3)

  3. Will produce error

  4. (1,4,3)

Reveal answer Fill a bubble to check yourself
B Correct answer

Keep practicing — related questions

  • Which variable stores the parameters passed to subroutine?
  • What will be printed?my @a = (1, undef, 2);my \$sum = 0;foreach my \$val (@a) { eval { \$sum += foo(\$val);...
  • What gets printed? my @a = ([1, 2, 3, 4], [5, 6, 7, 8]); print join(' ', @{$a[1]}[1..3]);
  • What gets printed? my @a = ([1, 2, 3, 4], [5, 6, 7, 8]); print join(' ', @{$a[1]}[1..3]);
  • What will be the value of $size after executing the following code?my @a = (0, 1, 2);$#a = 0;my $size = @a;
  • In perl ,if $variable="10" then what will output of print 'this is $variable'; ?
  • What will be printed? use strict; my @a = (1, 2, 3); my %b = (2 => undef); for my $val (@a) { last if $b{$v...
  • @array= (“one”,”two”,”three”,”four”,”five”); @sublength = (1,2,3); @sub_array = @array[@sublength]; print @...
Play the full quiz 🎤 Practise this topic out loud

Practice this topic

  • Programming Languages and Compilers (2284 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy