0

programming languages Online Quiz - 124

Description: programming languages Online Quiz - 124
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0
  1. splice (@array, 0, 1);

  2. splice (@array, @array-1, 1);

  3. splice (@array, scalar(@array), 0, @sublist);

  4. splice (@array, 0, 0, @sublist);


Correct Option: A

pop (@array);

  1. splice (@array, 0, 1);

  2. splice (@array, @array-1, 1);

  3. splice (@array, scalar(@array), 0, @sublist);

  4. splice (@array, 0, 0, @sublist);


Correct Option: B

@array = (10,30,20); sort(@array); print @array;'

  1. 10 20 30

  2. 10 30 20

  3. 30 20 10

  4. 1 2 3


Correct Option: B

. '@array = (“cat”, “rat”, “mat”); chop(@array); print @array;'

  1. ca ra ma

  2. cat rat ma

  3. cat rat

  4. cat rat mat


Correct Option: A

$string = "Hello World"; substr($string,6)="Perl"; print $string;

  1. Hello Perl

  2. Hello Perl World

  3. Hello

  4. Perl World


Correct Option: A

if(143 lt 34) { print “If is true”; } else { print “If is false”; }

  1. If is true

  2. If is false

  3. Error

  4. No output


Correct Option: A

/d[^oO]g/ matches?

  1. dog

  2. dOg

  3. doOg

  4. dig


Correct Option: D
  1. To enclose a subpattern in parenthesis without storing it in memory.

  2. To define a boundary condition

  3. To enclose a pattern within pattern

  4. None of the above


Correct Option: A

Which of the following is not a predefined subroutine?

  1. BEGIN

  2. END

  3. DEFAULT

  4. AUTOLOAD

  5. NONE OF THE ABOVE


Correct Option: C

Which is the best way to delete an element in an associative array?

  1. Delete

  2. Push

  3. Pop

  4. Shift

  5. Unshift


Correct Option: A
  1. hello

  2. 0

  3. hello => all

  4. HASH(0x??????) where ?????? is a group of hex digits.

  5. error


Correct Option: D
  1. scalar

  2. any decimal value

  3. empty value

  4. x


Correct Option: C
- Hide questions