11.05.2010

New Update : Oracle placement papers | Oracle placement papers 2010 with answers | Oracle placement papers with solutions | Oracle MNC Company placement papers | Oracle Freshers Interview Questions

1.There are six steps that lead from the first to the second floor. No two people can be on the same step
Mr. A is two steps below Mr. C
Mr. B is a step next to Mr. D
Only one step is vacant ( No one standing on that step )
Denote the first step as step1 and second step as step2 etc.

Which of the following is false

i. B&D can be both on odd-numbered steps in one configuration
ii. In a particular configuration A and C must either both an odd numbered steps or both an even-numbered steps
iii. A person E can be on a step next to the vacant step.

(A) i only
(B) ii only
(C) iii only
(D) both i and iii

2. If a boat is moving in upstream with velocity of 14 km/hr and goes downstream with a velocity of 40 km/hr, then what is the speed of the stream ?

(A) 13 km/hr
(B) 26 km/hr
(C) 34 km/hr
(D) none of these

3. Find the value of ( 0.75 * 0.75 * 0.75 – 0.001 ) / ( 0.75 * 0.75 – 0.075 + 0.01)

(A) 0.845
(B) 1.908
(C) 2.312
(D) 0.001

4. A can have a piece of work done in 8 days, B can work three times faster than the A, C can work five times faster than A. How many days will they take to do the work together ?

(A) 3 days
(B) 8/9 days
(C) 4 days
(D) can’t say

5. A car travels a certain distance taking 7 hrs in forward journey, during the return journey increased speed 12km/hr takes the times 5 hrs.What is the distance travelled

(A) 210 kms
(B) 30 kms
(C) 20 kms
(D) none of these

6. Find (7x + 4y ) / (x-2y) if x/2y = 3/2 ?

(A) 6
(B) 8
(C) 7
(D) data insufficient

7. If on an item a company gives 25% discount, they earn 25% profit. If they now give 10% discount then what is the profit percentage.

(A) 40%
(B) 55%
(C) 35%
(D) 30%

8. What does the following piece of code do ?
sprintf(retbuf, “%d”, n);

(A) Print the Integer value of n
(B) Copy the string representation of the integer variable n into the buffer retbuf
(C) Print the Float value of n.
(D) Print the string representation of the integer variable n.

9. What is wrong with the program
double d;
scanf(“%f”, &d);

(A) Instead of %f , %lf should be used for formatting
(B) Instead of %f , %d should be used for formatting
(C) Instead of %f , %D should be used for formatting
(D) Instead of %f , %n should be used for formatting

10. What fucntion will read a specified number of elements from a file?

(A) readfile()
(B) fread()
(C) fileread()
(D) getline()

11.
#include
void func()
{
int x = 0;
static int y = 0;
x++; y++;
printf( “%d — %d\n”, x, y );
}
int main()
{
func();
func();
return 0;
}

What will the code above print when it is executed?
(A) 1– 1
1 – 1
(B) 1 — 1
1 — 2
(C) 1 — 1
2 — 1
(D) 1 — 0
1 — 0

12. What is the output of the following loop:
for(I=0, j=I++; j>I; j++, I++)
{
printf(“%d%d”, I, j);
}

(A) 0,1
(B) 0,0
(C) Infinite loop
(D) No output

13. Consider the following structure
struct
{
int data;
struct node *prev;
struct node *next;
}node;

NULL ß 5 à 8 à 10 à NULL
ß ß
p q r

What will be the value of r à prev à next à data ?

(A) 10
(B) 8
(C) 5
(D) NULL

14. What is the output :
void main()
{
int a,b=5,c=10;
a = (b-c) > (c-b) ? b : c;
printf(“%d”,a);
}
(A) 10
(B) 5
(C) 0
(D) Error

15. Which section of a PL/SQL block would most likely contain a RAISE statement?

(A) Header
(B) Declarative
(C) Executable
(D) Exception

16. Select the VALID trigger type(s)?

(A) AFTER statement trigger
(B) INSERT row trigger
(C) DELETE row trigger
(D) All of the above

17. Which section of a PL/SQL block would most likely contain a RETURN statement?

(A) Header
(B) Declarative
(C) Executable
(D) Exception

18. Select the non valid PL/SQL Data Type(s)?

(A) BOOLEAN
(B) LONG
(C) STRING
(D) DATE

19. Which function below can best be categorized as similar in function to an IF-THEN-ELSE statement?

(A) SQRT
(B) DECODE
(C) NEW_TIME
(D) ROWIDTOCHAR

20. Which one of the following does not require a number parameter?

(A) sinh
(B) to_number
(C) SQRT
(D) round

21. The user issues the following statement. What will be displayed if the EMPID selected is 60494?

SELECT DECODE(empid,38475, “Terminated”,60494, “Recruited”,
“Not Recruited”) FROM emp;

(A) 60494
(B) 38475
(C) Terminated
(D) Recruited

22. In order to perform an inner join, which criteria must be true?

(A) The common columns in the join do not need to have shared values.
(B) The tables in the join need to have common columns.
(C) The common columns in the join may or may not have shared values.
(D) The common columns in the join must have shared values.

23. Once defined, how long will a variable remain so in SQL*Plus?

(A) Until the database is shut down
(B) Until the instance is shut down
(C) Until the statement completes
(D) Until the session completes

24. The default character for specifying runtime variables in SELECT statements is

(A) Ampersand
(B) Colon
(C) Hash
(D) Astreik

25. A user is setting up a join operation between tables EMP and DEPT. There are some employees in the EMP table that the user wants returned by the query, but the employees are not assigned to departments yet. Which SELECT statement is most appropriate for this user?

(A) select e.empid, d.head from emp e, dept d;
(B) select e.empid, d.head from emp e, dept d where e.dept# = d.dept#;
(C) select e.empid, d.head from emp e, dept d where e.dept# = d.dept# (+);
(D) select e.empid, d.head from emp e, dept d where e.dept# (+) = d.dept#;

26. For avoiding a Cartesian product of 4 tables, the minimum no: of Joins required after WHERE clause is:

(A) 2
(B) 3
(C) 4
(D) 5

27. Which one of the following uses of the HAVING clause is inappropriate?

(A) To put returned data into sorted order
(B) To exclude certain data based on known criteria
(C) To include certain data based on unknown criteria
(D) To include certain data based on known criteria

28. The “emp” table contains 14 rows. How many rows will the following query return?
SQL> Select * from Emp where rownum > 5;

(A) 9
(B) 10
(C) 0
(D) Error

29. Which line in the following SELECT statement will produce an error?

Line1: SELECT dept, AVG(salary)
Line2: FROM emp
Line3: GROUP BY empid;

(A) Line 1 and Line 2
(B) Line 3
(C) Only Line 1
(D) There are no errors in this statement.

30. Which of the following integrity constraints automatically create an index when defined?

(A) Foreign keys
(B) Unique constraints and Primary Keys
(C) NOT NULL constraints
(D) Both a and b.

—————————————————————————

1. Which of the following is not similar with the others?

(A) cube
(B) sphere
(C) pyramid
(D) circle

2. Consider the following flow chart for a customer:

The person in No.1 is:

(A) Married, with children
(B) Married, with at least one son
(C) Unmarried, with at least one daughter
(D) Unmarried, with at least one son

3. Susan can type 10 pages in 5 minutes. Mary can type 5 pages in 10 minutes. Working together, how many pages can they type in 30 minutes?

(A) 15
(B) 20
(C) 65
(D) 75

4. Consider the following series:
4, 6, 9, 13, ____ What comes next?

(A) 15
(B) 16
(C) 17
(D) 18

There are six steps that lead from the first to the second floor. No two people can be on the same step
Mr. A is two steps below Mr. C
Mr. B is a step next to Mr. D
Only one step is vacant ( No one standing on that step )
Denote the first step by step 1 and second step by step 2 etc.

5. If Mr. A is on the first step, Which of the following is true?

(A) Mr. B is on the second step
(B) Mr. C is on the fourth step.
(C) A person Mr. E, could be on the third step
(D) Mr. D is on higher step than Mr. C.

6. If Mr. E was on the third step & Mr. B was on a higher step than Mr. E which step must be vacant

(A) step 1
(B) step 2
(C) step 4
(D) step 5

7. If Mr. B was on step 1, which step could A be on?

(A) 2&3 only
(B) 3&5 only
(C) 3&4 only
(D) 4&5 only

8. If there were two steps between the step that A was standing and the step that B was standing on, and A was on a higher step than D , A must be on step

(A) 2
(B) 3
(C) 4
(D) 5

9. int z;
int x = 5;
int y = -10;
int a = 4;
int b = 2;

z = x++ – –y * b /a;

What number will z in the sample code above contains
(A) 5
(B) 6
(C) 10
(D) 11

10. f = fopen( fileName, “r” );
if( ???? )
{
fprintf( stderr, “Cound not open file!” );
exit( -1 );
}

What should replace the ???? in the code above to determine if the file could not be opened?

(A) f == NULL
(B) f == EOF
(C) f != 0;
(D) f == -1

11. int x[] = { 1, 4, 8, 5, 1, 4 };
int *ptr, y;
ptr = x + 4;
y = ptr – x;
What does y in the sample code above equal?

(A) -3
(B) 0
(C) 4
(D) 4 + sizeof( int )

12. #include
void func()
{
int x = 0;
static int y = 0;
+; y++;
printf( “%d — %d\n”, x, y );
}
int main()
{
func();
func();
return 0;
}

printf(“%d\n”, 64>>3);
What will the sample code above produce when executed?

(A) 8
(B) 16
(C) 32
(D) 256

13. What is the output of the following code:
char str[20] = “ENIGMA”;
char *p, *q, *r;
q=p++;
r=p+3 – (p-q);
printf(“%3s%5s”, (++p)+3, r);

(A) ENIGMA
(B) GMA
(C) No output
(D) Error.

14. #include
void inc_count(int count)
{
count ++;
}
int main()
{
int count = 0; /* number of times through */
while (count < 10)
inc_count(count);
return count ;
}
What will be the value returned by the function main?

(A) 0
(B) 10
(C) 9
(D) Null

15. What is the correct way to define a constant pointer?

(A) const char *name_ptr = “TEST”;
(B) char *const name_ptr = “TEST”;
(C) Both
(D) None of Above.

16. Which one of the following are parts of an entity relationship diagram?
(A) Referential integrity constraints
(B) Entities and Relationships
(C) Triggers
(D) Both a and b

17. The transaction control that prevents more than one user from updating data in a table is called
(A) Locks
(B) Commits
(C) Rollbacks
(D) Savepoints

18. Any locks placed in a session can be released issuing which of the following statements

(A) commit
(B) rollback
(C) Both a and b
(D) By a savepoint

19. Which of the following statements are true about roles?

(A) Roles can be granted to other roles and/or users.
(B) Privileges can be granted to roles.
(C) Roles can be granted to synonyms.
(D) Both a and b.

20. The limit for the number of parameters for a pl/sql procedure is

(A) 256
(B) No Limit at all
(C) Depends on the type of parameters passed to the procedure
(D) Depends on Positional Parameters passed.

21. The exact content and the storage representation of a column in database can be found out using the function

(A) translate
(B) to_char
(C) dump
(D) substr

22. A view is a

(A) A Table in the database belonging to different schema.
(B) A query stored in the database in the form of an object.
(C) A part of a table
(D) All the above.

23. The key word used in sql for string searching is

(A) LIKE
(B) NVL
(C) GROUP BY
(D) HAVING

24. For referrential integrity to be maintained.

(A) Every foreign key value must have a corresponding primary/unique key value
(B) No Forein key should have a corresponding primary key value.
(C) There should be an index on the tables.
(D) The tables should be in different schemas of the database.

25. A ddl statment in a pl/sql can be issued in a pl/sql block using the package

(A) dbms_output
(B) dbms_sql
(C) UTL_FILE
(D) dbms_job

26. Choose the result of the following sql statement.

SELECT hire_date
FROM emp
where to_char(hire_date) > ‘01-FEB-00’;

(A) 01-APR-00
(B) 01-OCT-00
(C) 01-APR-99
(D) 01-DEC-00

27. Purity level of a function can be checked using

(A) PRAGMA EXCEPTION_INIT.
(B) PRAGMA RESTRICT REFERENCES
(C) DBMS_OUTPUT.
(D) DBMS_SQL.

28. The __________ Statement is used to run the pl/sql block.

(A) Get filename
(B) start filename
(C) run filename
(D) None of the above

29. Difference between %TYPE and %ROWTYPE

——————————————————————

1. A certain number of men can finish a piece of work in 10 days. If however there were 10 men less it will take 10 days more for the work to be finished. How many men were there originally?

(A) 110 men
(B) 130 men
(C) 100 men
(D) none of these

2. In simple interest what sum amounts of Rs.1120/- in 4 years and Rs.1200/- in 5 years ?

(A) Rs. 500
(B) Rs. 600
(C) Rs. 800
(D) Rs. 900

3. If a sum of money compound annually amounts of thrice itself in 3 years. In how many years will it become 9 times itself.

(A) 6
(B) 8
(C) 10
(D) 12

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

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

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

6. x% of y is y% of ?

(A) x/y
(B) 2y
(C) x
(D) can’t be determined

7. The price of sugar increases by 20%, by what % should a housewife reduce the consumption of sugar so that expenditure on sugar can be same as before ?

(A) 15%
(B) 16.66%
(C) 12%
(D) 9%

8. A man spends half of his salary on household expenses, 1/4th for rent, 1/5th for travel expenses, the man deposits the rest in a bank. If his monthly deposits in the bank amount 50, what is his monthly salary ?

(A) Rs.500
(B) Rs.1500
(C) Rs.1000
(D) Rs. 900

9. What is the difference between the two declaration ?

#include
&
#include “stdio.h”

(A) No Difference
(B) The 2nd declaration will not compile
(C) First case Compiler looks in all default location and in 2nd case only in the working directory
(D) Depends on the Compiler

10. 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);

11. What is the output of the following program
#include
#define FIRST_PART 7
#define LAST_PART 5
#define ALL_PARTS FIRST_PART + LAST_PART

int main() {

printf (“The Square root of all parts is %d\n , ALL_PARTS * ALL_PARTS) ;
return(0);
}

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

12. What is the use of a make file

(A) Do detect memory leakage
(B) To optimise the code
(C) To link and compile source code to exe
(D) To disassemble the exe to source code

13. What is the difference between calloc and malloc

(A) calloc allocates memory in contiguous bytes, malloc does not ensure contiguous memory allocation
(B) Memory allocated through calloc need not be freed explicitly, While memory allocated through malloc needs to be freed explicitly.
(C) calloc initialises the memory by setting all-bits-zero, malloc does not does any zero fill.
(D) all of the above

14. What is the output :
void main()
{
int a,b=5,c=10;
a = (b-c) > (c-b) ? b : c;
printf(“%d”,a);
}

(A) 10
(B) 5
(C) 0
(D) Error

15. What is the value of *second_ptr

int *first_ptr;
int *second_ptr;

*second_ptr = 30;
ptr value = 1;
first_ptr = &value
second_ptr = first_ptr;

(A) 30
(B) 1
(C) first_ptr
(D) None of the above

16. How many columns are retrieved from this query:
SELECT address1||’,'||address2||’,'||address2 “Adress” FROM employee;

(A) 1
(B) 2
(C) 3
(D) 0

17. To produce a meaningful result set without any cartesian products, what is the minimum number of conditions that should appear in the WHERE clause of a four-table join?

(A) 8
(B) 3
(C) 4
(D) 5

18. Assuming today is Monday, 10 July 2000, what is returned by this statement:

SELECT to_char(NEXT_DAY(sysdate, ‘MONDAY’), ‘DD-MON-RR’) FROM dual;

(A) 10-JUL-00
(B) 12-JUL-00
(C) 11-JUL-00
(D) 17-JUL-00

19. Which character is used to continue a statement in SQL*Plus?

(A) *
(B) /
(C) -
(D) @

20. When a user creates an object without a TABLESPACE clause, where will Oracle store the segment?

(A) System tablespace
(B) Users tablespace
(C) Default tablespace for the user
(D) Oracle will give an error

21. The primary key on table EMP is the EMPNO column. Which of the following statements will not use the associated index on EMPNO?

(A) select * from EMP where nvl(EMPNO, ’00000′) = ’59384′;
(B) select * from EMP where EMPNO = ’59384′;
(C) select EMPNO, LASTNAME from EMP where EMPNO = ’59384′;
(D) select 1 from EMP where EMPNO = ’59834′;

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

(A) INSTR
(B) SUBSTRING
(C) SUBSTR
(D) POS

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

(A) DROP
(B) DELETE
(C) CASCADE
(D) TRUNCATE

24. Which of the following can be a valid column name?

(A) Column
(B) 1966_Invoices
(C) Catch_#22
(D) #Invoices

25. Which Oracle access method is the fastest way for Oracle to retrieve a single row?

(A) Primary key access.
(B) Access via unique index
(C) Table access by ROWID
(D) Full table scan

26. In this PL/SQL statement, which of the following lines will produce an error?

(A) cursor CAPITALS is select CITY, STATE
(B) into my_city, my_state
(C) from CITIES
(D) where CAPITAL = ‘Y’;

27. In a PL/SQL block, a variable is declared as NUMBER without an initial value. What will its value be when it is used in the executable section of the PL/SQL block?

(A) NULL
(B) 0
(C) Results in a compilation error
(D) An exception will be raised

28. PL/SQL raises an exception, in which TWO of the following cases:

(A) When a SELECT statement returns one row
(B) When a SELECT statement returns more than one row
(C) When the datatypes of SELECT clause and INTO clause do not match
(D) When INTO statement is missing in the SELECT statement

29. What is the result if two NULL values are compared to each other?

(A) TRUE
(B) FALSE
(C) Undefined
(D) NULL

30. Functions for error trapping are contained in which section of a PL/SQL block?

(A) Header
(B) Declarative
(C) Executable
(D) Exception

Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl