0

programming languages Online Quiz - 123

Description: programming languages Online Quiz - 123
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

my $txt = ‘I am learning Perl’; $txt =~ /(\w+)$/; print $1;

  1. I am learning Perl

  2. I

  3. Perl

  4. l

  5. learning


Correct Option: C

In perl, a/n -------------- is a special character or a sequence that will define the number of times the previous character or sequence appears.

  1. Character Class

  2. Meta character

  3. Quantifier

  4. Assertion


Correct Option: C

splice(@array,-1)

  1. Equal to Pop

  2. Equal to Push

  3. Equal to Shift

  4. Equal to Unshift

  5. Does nothing


Correct Option: A

push (@array, @sublist);

  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: C

unshift (@array, @sublist);

  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: D

$input = "azz"; print ++$input;

  1. abc

  2. aza

  3. baa

  4. aaa


Correct Option: C

$input = 'abc'; print --$input;

  1. abc

  2. abb

  3. minus 1

  4. Error:Can perform this operation


Correct Option: C

$val = 26; $result = (++$val, $val+5); print $ result;

  1. 31

  2. 32

  3. 29

  4. 33


Correct Option: B

Perl is

  1. Compiled Language

  2. Interpretive Language

  3. Machine Language

  4. All the above


Correct Option: B

. Shifting left n bits, and right n bits, Where n is some number greater than 0 is equivalent to?

  1. Mulitplying by 2*n and Dividing by 2*n

  2. Dividing by 2*n and Multiplying by 2*n

  3. Multiplying by n and Dividing by n

  4. Dividing by n and Multiplying by n


Correct Option: A

/de{3,}/ matches

  1. deeef

  2. def

  3. deef

  4. deeeef

  5. AandD


Correct Option: E

@array = (1,2); ($scalar1, $scalar2, $scalar3)[email protected]; print $scalar1, $scalar2, $scalar3;

  1. 1 2 Null value

  2. 1 2 0

  3. 1 2 3

  4. Error:Array out of bound


Correct Option: A

Is null string list (“”) equivalent to empty list()

  1. True

  2. False


Correct Option: B

Which of the followings can be a pattern delimiter

  1. $

  2. ^

  3. "

  4. %

  5. III and IV


Correct Option: E

/abc(?=def)/ matches?

  1. abc

  2. abcdef

  3. abcdefgh

  4. abcde

  5. II and III


Correct Option: E
  1. abc

  2. abcdef

  3. abcd

  4. abdef

  5. I and III


Correct Option: E
- Hide questions