Oracle
It contains 30 Questions of SQL + PL/SQL and the TIME allocated is 30 minutes
After test (15 Mins.) a Oracle guy declared test results by announcing the full name of candidates and apologising to others. Very Polite.
Then another test for Programming is there.
After this they have to go for the round of Interviews.
Aptitude section of Oracle
Two words are given by
Word 1: 83263641
Word 2: 3715468 ( don’t remember the order of the numbers.)
Each character is represented by a digit and each digit represents a character.
It is given that T and R occur four times. S and A occur two times. E, P, O and M occur one time each. The word
starts with T. The letter E occurs in word one only. The questions were,
a). Which number represents T.
b). Which number represents S.
c). Which character represents 2.
d). Which digit represents A.
e). Which word represents word 2.
There was a table with data related to net sales, gross profit, etc... and some questions were asked related to it. Very easy…
A man spent 1/6th of his life in child hood, 1/12th of his life as youngster and 1/7th of his life as a bachelor. After five years of his marriage a son was born to him. The son died four years before the father died and at the time of his death his age was half the total age of his father.
The questions were,
a. What is the age of the father. (84)
b. At what age was he married.(33)
c. What is the age of his son.(42)
Rita puts 9 pairs of black socks and 8 pairs of white socks in a drawer. She takes 3 socks. What is the probability that we get a pair of black socks.
What is the value of the following series 1/7 + 2/72 + 1/73 +2/74 + 1/75 + ……….
What should be the value of a, in the polynomials x2 – 11x + a and x2 – 14x + 2a, so that these two polynomials have common factors. a) 24 b)1 c)-1 d)1/2
What is the sum of all the four digit numbers formed using the digits 0, 1, 2 and 3. None of the two digits should be repeated.
a right angled triangle, the square of the hypotenuse is twice the product of the other two sides. Then one of the acute angles of the triangle is… a) 450 b) 300 c) 600 d) 150
There are two square rooms. Both are of same height. The second room is 5m longer than the first room. The rate for papering the walls is 10 paisa per square meter. The total cost for papering the rooms is Rs 60 and Rs 80. What is the height of the rooms.
There are two numbers in the ratio 8:9. if the smaller of the two numbers is increased by 12 and the larger number is reduced by 19 thee the ratio of the two numbers is 5:9.
Find the larger number.
In class of 10 students, the teacher writes a number on the board. The first student tells that the number is divisible by 1, the second student tells that the number is divisible by 2, the third by 3, the forth by 4 and so on till 10. If the statement of one of the students in wrong then what is the least number possible.
The first and the last sentences of a set of sentences are given. The middle four sentences are in jumbled form we have to select the order in which the sentences are to be placed so that they convey a meaningful message.
A passage with two paragraphs is given. Then two questions are asked based on it. Could not remember it.
A stamp collector arranges his stamps during his free time. When he arranges his stamps in pairs, there is one stamp left. It is the same when he arranges the stamps in groups of 3, 4, 5 and 6. Now, how many stamps will he be left with when he arranges them in groups of 8.
Technical
Delete from table tempv where rowid in (select rowid from tempv where rowid in (((select min(rowid) from tempv where ... count(*) > 1))) union(select rowid from tempv where rowid in (((select min(rowid) from tempv where ... count(*) > 1)));
When there is a failure in fetching the rows from a cursor...
a. %isopen
b. %notfound
c. %found
d. %rowcount
Select 'oracle' from dual where null = null;
a. oracle
b. null
c. error out
d. no rows selected
here is a question of Package body and Package Specification, they have provided the code for that describing the scenario of movie_tickets_sold and asked the programmer to insert a block of code...., where that code block to be inserted? In Package body? or in Package Specification?
Which of the following operator is not used in Outer Join?
a. =
b. !=
c. AND
d. OR
PL/SQL uses which of the following
a. Early Binding
b. Late binding
c. No Binding
d. Deferred Binging
Following is a database trigger, CREATE OR REPLACE TRIGGER delete_row ON DELETE
not remember the complete question.
If table contains 100 rows and it is truncated, how many rows get updated
a. 0
b. 1
c. 100
d. No rows updated
There are some questions on Basic SELECT STATEMENTS...
Some questions on Triggers, Procedures
VARRAYS/Nesting of Table: 1 question is there
NLS_DATE_FORMAT: 1 question
The size of the float data type in C language is …
he size of the float data type in C language is …
What is the output of the following C program.
Main()
{
printf(“%c”,”abcdefgh”[4]);
}
What is the o/p of the following C-program.
Main()
{
char str[7]=”strings”;
printf(“%s”,str);
}
main()
{
file *fp;
fp=fopen(“xyz”,”r”);
}
What does fp point to?
What is the maximum no. of arguments that can be given in a command line in C.
When the variables are pushed into the stack, which method is used to retrieve them from it.
a) pop b) pull c) remove d) none of these.
What is the size of integer variable in JAVA?
A programs reads “The man and the boy\r\n” from a file using fgets() and stores it in str[]. Then the string stored in str is
a) “The man and the boy\r\n\0”
b) “The man and the boy\r\0”
c) “The man and the boy\n\0”
d) “The man and the boy\0”
After this written exam, we had another written for the short-listed students. It contained algorithms and coding. There were two questions.
The first one was the conversion of a given expression into its postfix form and then to evaluate it.
The question was to have a circularly linked link-list of integers 1 to n. I we give k as an input then we have to output(print) 1, k, 1+2k, 1+3k … till n and we have to delete these numbers. When we give then next k we have to continue the same process starting with 2. The linked needs to be maintained.

This is the oracle paper
This is the oracle paper held on July 13 2003 at NITK Surathkal. The test has 2 sections : 30 technical and 30 aptitude and 60 min time. Technical section: its very easy any one can answer 25 qns without preperation. some are
How compiler treats variables of recursive functions
What is orthogonal matrix?
Given two tables and asked 2 qns on those table ,
One is on join and another is on NOT IN
Given some qns on pointers( pretty easy)
Given five qns on data structures like , lifo, fifo
Qtn on primary key
How NULL in sql is treated?
Given a doubly linked list and asked r->left->right->data ans: r->data
Explain const char *ptr and char *const ptr
Remaining i didn`t remember
Technical
What is the output of the following program? #include
#include
void main( )
{
int a=5,b=7;
printf(“%d\n”,b\a);
}
A. 1.4
B. 1.0
C. 1
D. 0
What is the output of the following program listing?
#include
void main ( )
{
int x,y:
y=5;
x=func(y++);
printf(“%s\n”,
(x==5)?”true”;”false”);
}
int func(int z)
{
if (z== 6)
return 5;
else
return 6;
}
A True
B false
C either a or b
D neither a nor b
What is the output of the following progarm?
#include
main( )
{
int x,y=10;
x=4;
y=fact(x);
printf(“%d\n”,y);
}
unsigned int fact(int x)
{
return(x*fact(x-1));
}
A. 24
B. 10
C. 4
D. none
Consider the following C program and chose collect answer
#include
void main( )
{
inta[10],k;
for(k=0;k<10;k++)
{ a[k]=k;}
printf (“%d\n”,k);
}
A. value of k is undefined ; unpredictable answer
B. 10
C. program terminates with run time error
D. 0
Consider the prog and select answer
#include
void main ( )
{
int k=4,j=0:
switch (k)
{
case 3: j=300;
case 4: j=400:
case 5: j=500;
}
printf (“%d\n”,j);
}
A. 300
B. 400
C. 500
D. 0
Consider the following statements:
Statement 1 A union is an object consisting of a sequence of named members of various types
Statement 2 A structure is a object that contains at different times, any one of the several members of various types
Statement 3: C is a compiled as well as an interpretted language
Statement 4: It is impossible to declare a structure or union containing an instance of itself
A. all the statements are correct
B. except 4 all are correct
C. statemnt 3 is only correct
D. statement 1,3 are incorrect either 2 or 4 is correct
consider the following program listing and select the output
#include
main ( )
{
int a=010,sum=0,tracker:
for(tracker=0;tracker<=a;tracker++)
sum+=tracker;
printf(“ %d\n”,sum);}
A. 55
B. 36
C. 28
D. n
Spot the line numbers , that are valid according to the ANSI C standards?
Line 1: #include
Line 2: void main()
Line 3: {
4 : int *pia,ia;
5 :float *pafa,fa;
6 :ia=100;
7 :fa=12.05;
8 :*pfa=&ia;
9 :pfa=&ia;
10 :pia=pfa;
11 :fa=(float)*pia;
12 :fa=ia;
13 :}
a. 8 and 9
b. 9 and 10
c. 8 and 10
d. 10 and 11
What is the o/p of the follow pgm?
#include
main()
{
char char_arr[5]=”ORACL”;
char c=’E’;
prinf(“%s\n”,strcat(char_arr,c));
}
a: oracle
b. oracl
c. e
d. none
consider the following pgm listing
#include
main()
{
int a[3];
int *I;
a[0]=100;a[1]=200;a[2]=300;
I=a;
printf(“%d\n”, ++*I);
printf(“%d\n”, *++I);
printf(“%d\n”, (*I)--);
printf(“%d\n”, *I);
}
what is the o/p
a. 101,200,200,199
b. 200,201,201,100
c. 101,200,199,199
d. 200,300,200,100
which of the following correctly declares “My_var” as a pointer to a function that returns an integer
a. int*My_Var();
b. int*(My_Var());
c. int(*)My_Var();
d. int(*My_Var)();
what is the memory structure employed by recursive functions in a C pgm?
a. B tree
b. Hash table
c. Circular list
d. Stack
Consider the follow pgm listing?
Line 1: #include
2: void main()
3: {
4: int a=1;
5: const int c=2;
6: const int *p1=&c;
7: const int*p2=&a;
8: int *p3=&c;
9: int*p4=&a;
what are the lines that cause compilation errors?
a. 7
b. 8
c. 6 and 7
d. no errors
what will be the o/p
#include
main()
{
inta[3];
int *x;
int*y;
a[0]=0;a[1]=1;a[2]=2;
x=a++;
y=a;
printf(“%d %d\n”, x,(++y));
}
a. 0,1
b. 1,1
c. error
d. 1,2
what is the procedure for swapping a,b(assume that a,b and tmp are of the same type?
a. tmp=a; a=b;b=temp;
b. a=a+b;b=a-b;a=a-b;
c. a=a-b;b=a+b;a=b-a;
d. all of the above
Post new comment