programming languages Online Quiz - 83
Description: programming languages Online Quiz - 83 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
What will be output ? my $val = 'x'; print ref($val);
What will be the output ? my $val = bless {}, 'MyClass'; print ref($val);
What will be the size of the @data array ? my $var = ':x:y:z:'; my @data = split(':', $var, -1);
What will be the output ? package A; sub new { my $class = shift; return bless {}, $class; } package B; use base 'A'; sub foo { return 'blah'; } package main; my $obj = B->new(); print $obj->foo(), "\n";
What will be the value of $keys ? my $var; if (exists $var->{key1}->{key2}) { $var->{key1}->{key2} = 1; } my $keys = keys(%{$var});
What will be the output ? my $str = 'a\b\n'; print $str;
What will be the value of $str ? my $str = '112133'; $str =~ s/(.)\1/$1/g;
What will the contents of @b array ? my @a = (10, 5, 1); my @b = sort @a;
Sample Code Code: INSERT INTO names VALUES ('John') How do you use the DBI module to execute the above SQL statement? Assume $dbh is the return value from DBI->connect.
What will be the output ? my $pattern = '.*'; $str =~ /(\Q$pattern\E)/;
Select the events available for a gridview/datagrid
Which of the following are said to be assemblies.
what are the namespace/classes related Database operation?
The different types of assemblies are private, public, shared, unshared, satellite.
An application can have more than 2 Global.asax files.
Following code will result in: int a1 = 5; double a2 = (float)a1;
Following code will result in: class A { int b = 1; public static void main(String [] args) { System.out.println("b is " + b); }}
Following code will result in: class A { public static void main(String [] args) {B b = new A(); }} class B extends A {}
Integer a = new Integer(2); Integer b = new Integer(2); What happens when you do if (a==b)?
Methods that are marked protected can be called in any subclass of that class.