Placement Papers - ORACLE

ORACLE
ORACLE PAPER - AUG 2003
Posted by :
Nirmla
(15)
Hi Friends

In Oracle\'s first round a written test is conducted .30 questions in 30 minutes objective type paper. So u can leave mugging the theory questions. Concentrate on basics and raw concepts.For e.g. 2 questions that i remember very well are :

1)declare
  l1 number := null;
  l2 number :=null;
  begin
  if l1=l2 then message(\'equal\');
  else
  if l1<>l2 then message(\'not equal\');
  else
  message(\'else\');
  end if;
  end if;
  end;
What will be the output ?
(a) equal
(b) not equal
(c) else
(d) No output
Correct Answer : (c)

2)declare
  lowerl number:= 1;
  upperl number:= 3;
  num varchar2(10);
  begin
  for i into lowerl..upperl
  loop
   num:=num||to_char(lowerl);
   if i=3 then upperl:=5;
   end loop;
  message(num);
  What will be the output ?
  (a)12
  (b)12345
  (c)123
  (d)Wrong assignment
Correct Answer : (c) ( I answered the question wrongly :-(

Be prepared and do the paper quickly but accurately. Before u\'ll know , 30 minutes will be over. Be aware of the program units given like above (they may be even lengthier ) and in the end o/p is asked. These sort of questions take a lot of time. So try answering general concepts questions first and then return to these sort of questions.