0

programming languages Online Quiz - 43

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

: What will be the size of the @fields array? my $record = ':a:b:c:'; my @fields = split(':', $record, -1);

  1. 0

  2. 1

  3. 3

  4. 5


Correct Option: D

What will be printed?my @a = (1, undef, 2);my $sum = 0;foreach my $val (@a) { eval { $sum += foo($val); }; if ([email protected]) { $sum += 100; }}print "$sum\n";sub foo { my $val = shift; die "I don't like undefs" unless defined $val; return $val + $val;}

  1. 2

  2. 6

  3. 106

  4. I don't like undefs


Correct Option: C
  1. 59

  2. Compile time error, because you have to do int total = ((Integer)(list.get(0))).intValue();

  3. Compile time error, because can't add primitive type in List.

  4. Compile Properly but Runtime Exception


Correct Option: A

What is the output for the below code ? public class Test { public static void main(String[] args) { Integer i = null; int j = i; System.out.println(j); } }

  1. 0

  2. Compile with error

  3. null

  4. NullPointerException


Correct Option: A

What are the languages the flex can be developed?

  1. ActionScript

  2. MXML

  3. HTML

  4. None of the above


Correct Option: A,B
- Hide questions