Alien head

programming languages Online Quiz - 80

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

Compile time error can

  1. Handle with try catch block

  2. Handle with Throwable class

  3. Both of above true

  4. None of above

Correct Option: D

RandomAccess interface is found in

  1. java.io

  2. java.util

  3. javax.xml.stream

  4. java.io.*

Correct Option: B

SortedSet can implement

  1. set

  2. ConcurrentSkipListSet

  3. Hashmap

  4. Queue

Correct Option: B

sorted map is

  1. interface

  2. class

  3. Object

  4. None of these

Correct Option: A

Which regular expression deletes all tags specified as text enclosed by "" from a document stored in a string, but deletes nothing else?

  1. $string =~ s///g;

  2. $string =~ s///g;

  3. $string =~ s///g;

  4. $string =~ s///g;

Correct Option: D

All three ways of calling new() are equivalent in the code below package A; sub new { my ($class, $param) = @_; return bless {param => $param}, $class; } package main; my $a1 = A->new('foo'); my $a2 = new A('foo'); my $a3 = A::new('A', 'foo');

  1. True

  2. False

Correct Option: B

What gets printed? my @a = ([1, 2, 3, 4], [5, 6, 7, 8]); print join(' ', @{$a[1]}[1..3]);

  1. 1 2 3

  2. 2 3 4

  3. 5 6 7

  4. 6 7 8

Correct Option: D

Which of the following is the correct way of sorting an array of integers in ascending order?

  1. sort @a

  2. sort {$1 <=> $2} @a

  3. sort {$a <=> $b} @a

  4. sort {$[0] <=> $[1]} @a

Correct Option: C

In Perl, 'stat' returns a thirteen element array with which of the following values?

  1. Last access

  2. Inode number

  3. Both of the above

  4. Perl Version ID

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. metacharacter

  3. assertion

  4. quantifier

Correct Option: D

my $a = '123'; my $b = '0123'; if ($a == $b) { print "same"; } else { print "different"; }

  1. same

  2. different

  3. the code is ill-formed

  4. none of the above

Correct Option: A

package A; sub NEW { bless {}, shift } sub AUTOLOAD { print ref(shift) } package main; my $obj = NEW A; $obj->foo();

  1. A

  2. AA

  3. Can't locate object method "foo" via package "A"

  4. none of the above

Correct Option: B

What elements will the @a array consist of? $_ = ' a b c '; my @a = split();

  1. ', 'a', ' ', 'b', ' ', 'c', ' '

  2. ', 'a', 'b', 'c', ''

  3. undef, 'a', 'b', 'c', undef

  4. 'a', 'b', 'c'

Correct Option: D

What will be the value of $size after executing the following code?my @a = (0, 1, 2);$#a = 0;my $size = @a;

  1. undef

  2. 0

  3. 1

  4. 2

Correct Option: C

Which three statements are true about the stages of database startup?

  1. Data files and redo log files can be renamed at the MOUNT stage

  2. Control files are required to bring the database to the NOMOUNT stage.

  3. Data files and online redo log files are checked for consistency while opening the database

  4. Data files and redo log files are made available to users at the OPEN stage.

Correct Option: A,C,D

Which statements are true regarding the logical structure of database? (Choose three)

  1. It is possible to have tablespaces of different block sizes in a database.

  2. A data block is the smallest unit of I/O for data files.

  3. Multiple tablespaces can share single data file.

  4. Each data block in the database always corresponds to one OS block

  5. Each segment contains one or more extents.

Correct Option: A,B,E

Your database is having two control files; three redo log file groups with two members in each group. Failure of which file would cause a instance to shut down?

  1. Loss of the initialization parameter file.

  2. One of the redo log members.

  3. Any data file belonging to the default permanent tablespace

  4. Any archive log file.

  5. Any control file.

Correct Option: E

Which two are valid locking levels that are used by transactions in oracle database? (Choose two)

  1. Object level.

  2. Row level.

  3. Block level.

  4. Schema level.

  5. Database level.

Correct Option: A,B

A user wants to connect to the database instance from an application that is running on a remote machine. Which tool should the DBA use to establish the required configuration to ensure that the user is able to connect to the database instance? (Choose two).

  1. Oracle Net Manager.

  2. Data Pump.

  3. Oracle Universal Installer (OUI).

  4. Oracle Enterprise Manager.

  5. Database Configuration Assistant (DBCA).

Correct Option: D

You specified segment space management as automatic for a tablespace what effect would this have on space management?

  1. Extents would be managed by freelists.

  2. Free space would be managed by data dictionary

  3. The segment would be managed by bitmaps.

  4. The segment would be managed by freelists.

Correct Option: C
+ View questions