Oracle placement papers 2009:

void main()
struct a
char ch[10];
char *str;
struct a s1={"Hyderabad","Bangalore"};
Ans: HB, HyderabadBangalore

2. main(int argc,int *argv[])
int i;
return 0;
Ans: I work for oracle

3.Which of the storage class(es) becomes the global variables for the entire Program
(A) Extern
(B) Static
(C) Auto
(D) Register

Ans: A

4. What is the output of the program
void main()
char s[]="oracle is the best";
char t[40];
char *ss,*tt;
// A. oracle is the best
// B. Core dump
// c. Error Message
// D. Goes into infinite loop

Ans: B. core dump (Garbage value)

5.Which of the following is not true incase of Command line arguments
A. The argc parameter is used to hold the number of arguments in the = command line and is an integer
B. The argv parameter is a pointer to an array of a character = pointer and each one points to command line arguments
C. The argv[1] always point to program name
D. None of above

Ans: C

6. A function without any return type declares return=20
A. Integer
B. Float
C. Void
D. Syntax Error

Ans: A

What will be the output of the fallowing SELECT statement ?
SELECT count(*)
FROM emp
Where exist (select 'X' From dept
Where dept_name ='Stores' and dept.dept_id=emp.dept_id)
A. select total number of employees belonging to department " stores "
B. select all employees belonging to department "X"
C. select all employees belonging to department "stores"
D. select total number of employees belonging to department "X"

8. Denormalisation is done to
A. Check for Data Integrity
B. Reduce Data Redundancy
C. Intoduce Security Check
D. Increase Query performance .

9. When there is a failure in fetching the rows from a cursor…
a. %isopen
b. %notfound
c. %found
d. %rowcount

10. what is the index no of the last element of an array with 29
a. 29
b. 28
c. 0
d. programmer defined

11. what is the final value of x when the code for(int
x=0;x<10;x++) is
a. 10
b. 9
c. 0
d. 1

12. what is the output of ..
void main()
char buffer[10]={"Genesis"};
a. 3
b. 4
c. 0
d. illegal pointer subtraction

13. what is the output for
static int a[]={5,10,15,20};
int * ptr=a;
int ** ptr_ptr=&ptr;
printf("\n %d",**ptr_ptr++);
a. 5
b. 10
c. 15
d. 6

14. Two trains move in the same direction at 50 kmph and 32 kmph respectively. A man in the slower train observes the 15 seconds elapse before the faster train completely passes by him.
What is the length of faster train ?

(A) 100m
(B) 75m
(C) 120m
(D) 50m

15. How many mashes are there in 1 square meter of wire gauge if each mesh is 8mm long and 5mm wide ?

(A) 2500
(B) 25000
(C) 250
(D) 250000

16. How can I print a “%” character in a in between the string foo and the value held in the variable foo using printf format string?

(A) fprintf("foo " "%" "%d\n", foo);
(B) fprintf("foo ‘%’ %d\n", foo);
(C) fprintf("foo \% %d\n", foo);
(D) fprintf("foo " "%d\n", foo);

17. What is the output of the following program

#define FIRST_PART 7
#define LAST_PART 5
int main() {
printf (“The Square root of all parts is %d\n , ALL_PARTS * ALL_PARTS) ;

(A) 35
(B) 144
(C) 49
(D) 47

18. Which character function can be used to return a specified portion of a character string?





Which command will delete all data from a table and will not write to the rollback segment?





20.Threading in java a program was given in which it had no exceptions and run function had string as its parameter

a. runtime error
b. compile time error
c. logical error
d. syntax error