Wednesday, April 30, 2008

oracle placements Jobs Paper

oracle placements Jobs Paper

Test was of 1 hour 30 questions. g aptitude and 30 of technical.......some questions. of g aptitude were very lengthy so don't end up in solving them.....time was less......some 15 questions. from arithmetic......and rest 15 logical, statement interpretation, arrangement, tense correction......and like that......

1. given a square matrix which consists only of 1 and 0......find which rows,which cols and which diagonals consist entirely of 1's.

2. given an array of integers find all possible combinations of the numbers whose sum equal to 90.....
ans : knapsack problem (in data structures - aho ullman)

Note : for them solution was not the criteria.......but the approach was important......the solution should be generalised and optimized........optimization was given the top priority........

here is the techincal paper :

plz try to solve them urself by trying on comp.

1. const int MAX=10;
{ enum a {a,b,MAX};
print MAX;
ans. 2

2. enum variable is a const variable which can only be assigned a value at initialization or a non const variable which can be assigned any value in the middle of the program?
ans. const variable

3. void *p;
what operation cannot be performed on p?
ans : arithmetic operation unless it is properly typecasted

4. char **p="Hello";
print p,*p,**p
ans. Hello (null)
warning: suspicious pointer conversion

5. main()
{ char str[]="Geneius";
print (str);

print(char *s)
{ if(*s)
ans. suiene

6. what does the function fcloseall() does ?
ans. fcloseall() closes all open streams except stdin,stdout,stderr,stdprn and stdaux

7. main()
{ printf("Genius %d",fun(123));

fun(int n)
{ return (printf("%d",n));
ans. 123genius3

8. difference between definition and declaration.
ans. definition once while declaration more than once

9. find the error?
{ void fun();
void fun()
{ int i=10;
return 2.0;
return 3.0;
ans. no error but warning

10. int a=9,b=5,c=3,d;
d=(b-c)<(c-a) ? a : b;
print d
ans 5

11. 1+2/3*4+1=?
ns. 2

12. In C++, a variable can be defined wherever needed whereas not in C

13. main()
{ int i=4;
print i;

fun(int i)
{ return i/2;
ans 1

14. what is an array ?
ans. contiguous collection of memory occupied by similar data types

15. printf("\"NITK %%SURAHKAL%% !\"");

16. difference between scanf and gets in case of string input
ans. scanf does not accepts white space while gets does

17. table t1 m rows and x cols
table t2 n rows and y cols
in t1*t2 rows? cols=?
ans. m*n ,x+y

18. symbol of realtionship between 2 entities?

19. which one cannot come in data modelling
a. customer b. student c. office d. speed
ans speed

20. can a database table
exist without a primary key ?

21. whether higher normal forms better than lower forms as far redundancy is concerned ?
ans. higher

22. file is at which level
ans. conceptual level

23. what is a foreign key
ans. primary key in some other table

* some questions are Code Snippet based.
* Some questions are compiler based i.e. given code snippet will compile or not, if not the reason.
* some question are from the prfix/postfix inc/dec operation based code snippets.
* More than 3 question are based on the sorting algorithms.
* some questions are from the pointers based.
* Code snippets involving memory allocation function.
* All the questions are from c
Some of the question ,i remember, are the following
#define sqr(x) (x*x)
int main()
int x=2;
printf("value of x=%d",sqr(x+1));

What is the value of x?
a)4 b)5 c)None d)can not compile
Ans: 5
2. what is the wrong in the following program?
#define LBRACKET {
#define RBRACKET }
#define MAIN main
int MAIN()
int x=2;
a) This program will compile
b) compilation error
int main()
int x=4;
int x=2;
a) 4 b)2 c)Nesting not allowed d)dependent on the compiler
4. Go through the following code sinippet
char a[20];
a="Hello Orcale Test";
will this compile?
a) Compilation Error b) Strings are allowed in c but cannot be assigned directly.
c) dependent on compiler
d) will work fine.
5. the expression a+b*c should be conveted to +a*bc. Using tree structure,
Which traversal is the correct one?
a) Postfix traversal b) prefix traversal c) infix traversal d)None
6. what about brk, sbrk
a) system calls b) function calls c) user defined functions
7. Why the use of alloca() is discouraged?
support multiple arguments ?
9. the header file
a) contains only compiler directives and extern variables
b) contail only structures and unitions
c) a & b
10. what about "char *(*(*a[])())();"

30 qns. technical - 30 mins. - mostly on DBMS,Oracle(like what would be the output), C, C++,Java(2-3 qns. on class and constructors) and datastructures.

30 qns. general - 30 mins. - 7 qns. aptitude, more like English (filling up prepositions, same meaning,
reading comprehension, four sentences would be given - you have to order them to form a paragraph, similarly four questions would be given - you have to say which one is a inference statement, which one is a judgement,etc.)

The technical test would be easy and general test would be little difficult.