0

programming languages Online Quiz - 98

Description: programming languages Online Quiz - 98
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0
  1. Runtime Exception

  2. Compilation error at line 1

  3. 2

  4. Compilation error at line 2

  5. Compilation error at line 3

  6. Compilation error at line 4


Correct Option: B

$string = "good food"; $string =~ s/o*/e/;print $string;

  1. geod food

  2. geed food

  3. geed feed

  4. egood food


Correct Option: D

Which Operator can be used in sort function for sorting array elements numerically?

  1. <>

  2. >

  3. <=>

  4. cmp


Correct Option: C

To repeat the iteration of loop we will use following statement ?

  1. next

  2. repeat

  3. recall

  4. redo


Correct Option: D

In perl ,if $variable="10" then what will output of print 'this is $variable'; ?

  1. this is $10

  2. this is $variable

  3. this is

  4. this is 10


Correct Option: B

what is output of print abs("123abc") ?

  1. 0

  2. 123

  3. abc

  4. 12


Correct Option: B
  1. work on first eleemnt of array

  2. work on last element of array

  3. works on all elements of array

  4. wont work on array


Correct Option: C

Which special variable actually tells perl where to look for perl modules ?

  1. %INC

  2. @INC

  3. INC

  4. %PATH%


Correct Option: B

How to length of string ?

  1. Length

  2. length

  3. len

  4. strlen


Correct Option: A

How to compile a perl program?

  1. perl -c <>

  2. perl -c

  3. You cannot compile a program

  4. perl -e <>


Correct Option: A

Which subroutine you need to define in your package if you want to handle calls to non-existing subroutines?

  1. DESTROY

  2. AUTOHANDLE

  3. AUTOLOAD

  4. AUTOLOADER


Correct Option: C

What is the name of default namespace in perl?

  1. main

  2. Main

  3. global

  4. name


Correct Option: A

Which of the following block executes at compile time?

  1. END

  2. BEGIN

  3. CHECK

  4. INIT


Correct Option: B
- Hide questions