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

output of below Program public static voi main(String[] args) { ArrayList; al=new List();//1 al.add("bima");//2 al.add("hidimba");//3 System.out.println(al.size());//4 }

  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

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

  1. next

  2. repeat

  3. recall

  4. redo


Correct Option: D

How to check version of perl on your machine ?

  1. perl -b

  2. perl -version

  3. perl -c

  4. perl -k


Correct Option: B

How to remove first element of a array?

  1. unshift

  2. delete

  3. shift

  4. move


Correct Option: C

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

  1. 0

  2. 123

  3. abc

  4. 12


Correct Option: B

How to check if key exists in a hash or not ?

  1. exists

  2. defined

  3. undef

  4. exist


Correct Option: A

chomp(@array) will

  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 function you will use to create object in perl?

  1. bless

  2. createobject

  3. create_object

  4. blessed


Correct Option: A

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

Which function removes last character of a string?

  1. chop

  2. chomp

  3. delete

  4. chopp


Correct Option: A
- Hide questions