Saturday, February 2, 2008

Oracle

ORACLE PAPER - 2004 - WARANGAL
REC Warangal ORACLE-2004

========================

paper having two parts.

part 1: apptitute test -30question (20min)
part 2: technical Test -30question (20min)

Part 1:

1)find the range of x*x -5x+6>0
X=3

2)if 5x*x+14*x+k=0 having two reciprocal roots find the value of k.

3&4)two sentence are given ,in between four sentence are given in change order. (like between 1 & 6 ,abcd four sentence are given 1 a b c d 6)
Find the correct order?

5)if first term of AP is 5 .16th term is 45.find the sum of first 16 terms.

6)x,y and z are odd no. not necessarly in sequence.then y=?
(1)mean of x and z is 114.
(2)mean of y and z is 113.

Ans: 115

7)ram is 27 year old then mohan.after 7 year ram age is thrice as mohan
age .find ram age?
Ans : 67/2

8)if three tapes are filling a tank of capacity of 500lit with speed of
30lit/sec,48lit/sec and 36lit/sec. Find after how long time tank will
fill?
Ans : 500/114

9)find the root of given eq x-2/(x-1)=1-2/(x-2) if possible.
Ans : x = 0

10)find the point of intersection of \
15x+9y=15
5x+3y=21

Ans : NO

11)suppose in a pot 20 cards are there label 1-20 on that. find the
probability of getting two prime.

Ans : 8/20 = 2 / 5

12)in an island three persons are there Jam ,Dam and Sam .sam having
pencil,dam having cap and Jam having book .we have find who is author
among them if.
(1)Sam says ,Jam is author but author wearing cap.
(2)Dam says ,I am author ,but author not having cap.
(3)Sam says, I am author ,but author having note book.
Find who is author?

Ans : jam

13)Jo ,Do and So are three person.
(1) So says Jo is football player, I also football player.
(2) Do says Jo is football player, I also football player.
(3) Jo says Do is football player, I also football player.
Find the football player player among them.

Ans : jo

14-16)question based analogy . like LION:CUB find the pair in given choice.

17)in a basket 3 mangos,4 apples and 4 bananas are there. Find no of ways we select randomly 3 fruit from basket?

18) if a^x=b^y=c^z and b^2=ac then find x+z/xz=?
Ans : 2/y

19)(loga)^2-(logb)^2 = ?
ans :- logab-loga/b

20)in a 60 liters of mixture of spirit and water is 7 %. in order to make water 19%,how much water should be added.(some thing like this)

21-25)A one and half page length passage will be given and 4 to 5
questions will be asked based on this passage.

26)

Technical part:-
==================
pattern: 1) pl/sql—>7 quest
2) java—>5 quest
3) c & pointers—>9 quest
4) dbms and dfd’s—>5 quest
5) ds—>4 quest

some quest are here:-
1.what is not a c- storage class
Ans.stack

2.if dba creates one user what are the privilages the user will get?

3. which keyword is used to const in java
Ans. final

4.char *array[4]={�some string�}
printf(�%d�,&array[4]-(array));
Ans.4

5.remote object will be in the package
Ans.java.net (verity it)

6.#define sq(a) (a*a)
printf (�%d�,sq (3+2));
Ans.11

7.#define max 20
printf (�%d�, ++max);
Ans.lvalue required — error

8.printf (�%d�,sizeof (2>3?4?:4:3?4:2));(some thing like this)
Ans.syntax error

9. what is important of free().

10.property of constructor in java program.

11.impotance of macro.

12.underfolw condition of stack.
(1)empty,2)push,3)pop,4)none)
====================

1)Which of the following is not a storage class in C?
Static
Register
Extern
Stack

2)Which of the following ‘return’ statement is correct?
return, return;
return(1, 2, 3);
return(return 4);
(return 5, return 6);

3)The second argument to fopen() function is?
char
const char *
int *
FILE *

4)What is the output of the program?
#include
void main()
{
char buffer[10] = {�Genesis�};
printf(� %d “, &buffer[4]- (buffer));
}
3
4
0
Illegal pointer subtraction
4

5)If “arr� is an array of 5 x 5 dimension, arr[2][4] is same as
**(a+3+4)
*(a+3)+*(a+4)
**(a+3)+4
*(*(a+2)+4)

—————————————————–
APTITUDE 30 questions

Log37
1: ——- = ? ( Log67 )
1 + Log32

2: log(a-b) = log a - log b; then a = ?
(b/(b2+1));

3: 3 black 7 white balls. prob of drawing 2 white balls ? (7/15)

4: In a lock of 4 rings there r five characters how
many unsuccessful attempts can be made ? (624)..

5: sqrt(6+sqrt(6+sqrt (6 + ..))))) = ? 3

6: a solution is prepared by mixing two solution with sprit 20% & 60%..In
what ration they should be mixed to get the 50% sprit in resultant solution.
(1:3)

7: X2 - (A-3)X +(A+3) = 0
for what value of A the sum of square of roots will be least ? (A=2);

8: ‘a’ number of persons work daily ‘b’ hours to produce ‘c’ items. If ‘d’ persons walks away from the group what will be the number of hours to produce ‘c’ items. ? (ab/(a-d))

9: - 13 Passage

14 - 18 venn diagram.

19-22 picking based (VERBAL);

23-25 picking odd once out (words )

26: m = ax , n = ay mxny = a2(x+y) find 1/x + 1/y? (1)

27 xy - 2y - 6 =0;
x 2 x >2 ..
y is always postive.

28
The diameter of circle can be determined from
1.area.
2.circumference.
Ans either of them.

29: sum of 2 no. is 7 & product s 10 fnd larger number.



PAPER 2

The test was of 1 hour 30 ques. g apti and 30 of
technical.......some
ques. of g apti were very lengthy so don,t end up in solving
them.....time was less......some 15 ques. from arithmetic......and
rest
15
logical,statement interpretation,arrangement,tense
correction......and
like
that......
i am enclosing here the 2 C questions :
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;
main()
{enum a {a,b,MAX};
print MAX;
}
2. enum object is a const which can only be assigned a value at
initialization or a variable which can be assigned any value in
the
middle of
the program?
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
5. main()
{char str[]="Geneius";
print (str);
}
print(char *s)
{if(*s)
print(++s);
printf("%c",*s);
}
6. what does the function fcloseall() does ?
7. main()
{printf("Genius %d",fun(123));
}
fun(int n)
{return (printf("%d",n));
}
8. difference between definition and declaration.
9. find the error?
fun()
{int i=10;
if(i<10) a="9,b=" c="3,d;" d="(b-c)<(c-a)" 1="?" i="4;" i="i/4);" cols="?" id="KonaLink2" target="_top" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://www.yuvajobs.com/oracle-paper.asp?page=3&order=id#">data modelling
a. customer b. student c. office d. 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 ?
22. file is at which level
ans. conceptual level
23. what is a foreign key

There are 2 round of written test
One is Technical

The Technical Test has 30 qns to be answered in 30
mins
This is Just a MODEL
Questions will be asked on C, C++, Oracle, RDBMS ,
Java and data structures
C
--

1. The expression 1= 30*1000+2768; evaluates to A)
32768 B) -32768 C) 113040 D) 0
2. Which is wrong
A) mess=123.56; B) con=,T,*,A,; C) this=,T"*20; D)
3+a=b

3) What is the output of Ptograms
Main()
{ int a=500,b,c;
if(a>400)
b=300; c=2--; printf("\n%d%d",b,c);}
4) Identify the error in
Main()
{char c1=,a,,c2=,Z,;
if (c1==,a,or c2==,z,) printf("welcome");}
5) What will the following program print
Main()
{inti; for(i=0;i<=10;i++); printf("%d\n",i);} 6) What will be the values of x,y,& z Main() { int x=10,y,a, y=--X; z=x--; printf(%d%d%d\n",x,y,z); } 7) What will be the output of Main() { int i; int marks[]={100,90,75,90,80}; for (i=0,i<4;i++) i="&arr[1];" j="&arr[5];" deptno="10;">
4) How would you declare a PL/SQL table of records to
holdthe rows selectd from the EMP table ?
5) Which statement about Implicit cursor is true ?
a) Implicit cursors are declared implicitly only from
DML
b) Implicit cursors are dclared implicitly for all the
DML and SELECT statements
c) Programmers needs to close all implicit cursors
before the end of PL/SQL programs
d) Programmers can declare Implicit cursors by using
cursor type in declaraion section
6) Evaluate this PL/SQL Block
Declare
V_Result number(2)
BEGIN
DELETE
FROM EMPLOYEES
WHERE department id (20,30,80);
V_result:=SQL%ROWTYPE;
COMMIT;
END;
/
What will be the value of v_result if no rows are
selected
a) 0 b) 1 c) TRUE d) NULL
7) Which two conditions in a PL/SQL block cause an
exception error to occur ? ( Choose 2 )
a) Select statement does not return a row
b) select stmt returns more than one row
c) select statement contaains a group by clause
d) seelct statenent donot have where clause
e) data type in the select list are inconsistent whith
data types in the into clause

DBMS/ RDBMS
-----------
1)You are requested to use the HIERARCHIAL DATABSE
model for the Human Resource DBMS System . Since your
entity relationship model for the system reveal that
most of the entities have many-o-many relationships
between them, you do not approve TOm,s
request.Referring to the above scenario,what is the
REASON behind your decision ?
<>

2) Which one of the following mechanisms in aRDBMS
ensure
a) 1 Constraints b) Locking c) Views d) Indexes
3) How does a data base stor information that is
related to the location of its tables
a) 1 by relationships
b) By normalisation
c) By a data dictionary
d) by data banking
e) By entity modeling
4) Two tables A & B would be given
You are asked to mintain a relationship between Table
A & B. Referring to the gien table, which field will
you choose as the primary key for Table A
<>

5) You have been asked to remove all aggregate
functions from your SQL statements refering to the
scenario above. WHich one of the following do you need
to remove ?
a) 1 SUM b) COUNT c) AVG d) MAX e) ROUND
Data structures
---------------
1) What will be the output of the gien program
int m,n=10,top=0,stack[11],item ,current;
main()
{
puts ("enter number of elements <11 top="1;top<=" m="top;m">0;--m)
printf("%d\n",stack[m]);
}
2)Questions on BINARY TRESS and LINKED LISTS
( 4 or 5 options would be given )
3) What are the THREE MODES OF traversal of a BINARY
TREE?


Oracle Corporation

1. Three beauty pageant finalists-Cindy, Amy and Linda-The winner was musician. The one who was not last or first was a math major. The one who came in third had black hair. Linda had red hair. Amy had no musical abilities. Who was first?
(A) Cindy (B) Amy (C) Linda (D) None of these

2. Two twins have certain peculiar characteristics. One of them always lies on Monday, Wednesday, Friday. The other always lies on Tuesdays, Thursday and Saturdays. On the other days they tell the truth. You are given a conversation.
Person A- today is Sunday, my name is Anil
Person B-today is Tuesday, my name is Bill What day is today?
(A) Sunday (B) Tuesday (C) Monday (D) Thursday

3. The difference of a number and its reciprocal is 1/2.The sum of their squares is
(A) 9/4 (B) 4/5 (C) 5/3 (D) 7/4

4. The difference of a number and its square is 870.What is the number?
(A) 42 (B) 29 (C) 30 (D) 32

5. A trader has 100 Kg of wheat, part of which he sells at 5% profit and the rest at 20% profit. He gains 15% on the whole. Find how much is sold at 5% profit?
(A) 60 (B) 50 (C) 66.66 (D) 33.3

6. Which of the following points are collinear?
(A) (3,5) (4,6) (2,7) (B) (3,5) (4,7) (2,3)
(C) (4,5) (4,6) (2,7) (D) (6,7) (7,8) (2,7)

7. A man leaves office daily at 7pm.a driver with car comes from his home to pick him from office and bring back home. One day he gets free at 5.30 and instead of waiting for driver he starts walking towards home. In the way he meets the car and returns home on car. He reaches home 20 minutes earlier than usual. In how much time does the man reach home usually?
(A) 1 hr 20 min (B) 1 hr (C) 1 hr 10 min (D) 55 min

8. If m:n = 2:3,the value of 3m+5n/6m-n is
(A) 7/3 (B) 3/7 (C) 5/3 (D) 3/5

9. A dog taken four leaps for every five leaps of hare but three leaps of the dog is equal to four leaps of the hare. Compare speed?
(A) 12:16 (B) 19:20 (C) 16:15 (D) 10:12

10. A watch ticks 90 times in 95 seconds. And another watch ticks 315 times in 323 secs. If they start together, how many times will they tick together in first hour?
(A) 100 times (B) 101 times (C) 99 times (D) 102 times

11. The purpose of defining an index is
(A) Enhance Sorting Performance (B) Enhance Searching Performance
(C) Achieve Normalization (D) All of the above

12. A transaction does not necessarily need to be
(A) Consistent (B) Repeatable (C) Atomic (D) Isolated

13. To group users based on common access permission one should use
(A) User Groups (B) Roles (C) Grants (D) None of the above

14. PL/SQL uses which of the following
(A) No Binding (B) Early Binding (C) Late Binding (D) Deferred Binding

15. Which of the constraint can be defined at the table level as well as at the column level
(A) Unique (B) Not Null (C) Check (D) All the above

16. To change the default date format in a SQLPLUS Session you have to
(A) Set the new format in the DATE_FORMAT key in the windows Registry.
(B) Alter session to set NLS_DATE-FORMAT.
(C) Change the Config.ora File for the date base.
(D) Change the User Profile USER-DATE-FORMAT.

17. Which of the following is not necessarily an advantages of using a package rather than independent stored procedure in data base.
(A) Better performance. (B) Optimized memory usage.
(C) Simplified Security implementation. (D) Encapsulation.

18. Integrity constrains are not checked at the time of
(A) DCL Statements. (B) DML Statements.
(C) DDL Statements. (D) It is checked all the above cases.

19. Roll Back segment is not used in case of a
(A) DCL Statements. (B) DML Statements. (C) DDL Statements. (D) all of the above.

20. An Arc relationship is applicable when
(A) One child table has multiple parent relation, but for anyone instance of a child record only one of the relations is applicable.
(B) One column of a table is related to another column of the same table.
(C) A child table is dependent on columns other than the primary key columns of the parent table.
(D) None of the above.

21. What is true about the following C functions?
(A) Need not return any value. (B) Should always return an integer.
(C) Should always return a float. (D) Should always return more than one value.

22. enum number { a=-1, b=4, c,d,e,} what is the value of e?
(A) 7 (B) 4 (C) 5 (D) 3

23. Which of the following about automatic variables within a function is correct?
(A) Its type must be declared before using the variable. (B) They are local.
(C) They are not initialized to zero. (D) They are global.

24. Consider the following program segment
int n, sum=5;
switch(n)
{
case 2:sum=sum-2;
case 3:sum*=5;
break;
default:sum=0;
}
if n=2, what is the value of the sum?
(A) 0 (B) 15 (C) 3 (D) None of these.


25. Which of the following is not an infinite loop?
(A) x=0; (B) # define TRUE 0....
do{ While(TRUE){....}
/*x unaltered within the loop*/ (C) for(;;) {....}
....}
While(x==0); (D) While(1) {....}

26. Output of the following program is
main()
{
int i=0;
for(i=0;i<20;i++)>

27. What does the following function print?
func(int i)
{
if(i%2) return 0;
else return 1;
}
main()
{
int i=3;
i=func(i);
i=func(i);
printf("%d",i);
}
(A) 3 (B) 1 (C) 0 (D) 2

28. What will be the result of the following program?
char*g()
{
static char x[1024];
return x;
}
main()
{
char*g1="First String";
strcpy(g(),g1);
g1=g();
strcpy(g1,"Second String");
printf("Answer is:%s", g());
}
(A) Answer is: First String (B) Answer is: Second String
(C) Run time Error/Core Dump (D) None of these

29. Consider the following program
main()
{
int a[5]={1,3,6,7,0};
int *b;
b=&a[2];
}
The value of b[-1] is
(A) 1 (B) 3 (C) -6 (D) none

30. Given a piece of code
int x[10];
int *ab;
ab=x;
To access the 6th element of the array which of the following is incorrect?
(A) *(x+5) (B) x[5] (C) ab[5] (D) *(*ab+5} .



PAPER 3
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 data structures.

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.


In the interview, they asked me the following questions.
=============

1. what are the macros other than C macros (the macros in word,excel)
A macro in MS-word is used to group a sequence of jobs and make it as a button or keyboard shortcut.
Suppose, if you need always to draw a table containing 2 rows and 5 cols, you can start,record a macro and
make it as a button and put in taskbar, so that when you press it, you will be provided with a fixed table.


2. can you delete a column from a table. In oracle 9i, you can do it by the statement
ALTER TABLE table1 DROP COLUMN column1; In oracle 8,you can,t.

3. can you store a image in oracle and by which datatype? Yes, you can and it can be acheived by using a BLOB (binary large object) type and store upto 4GB in a single column.

4. have you used reports and forms in oracle?

5. have you written applications to retrieve stored images in a table?

6. some DOS commands and UNIX.

7. project desription (both academic and miniprojects,if any)

8. some situation questions like what would you do if your company is burning,etc.



PAPER 4

1. It contains 30 Questions of SQL + PL/SQL and the TIME allocated
is 30 minutes
STRICTLY!

2. After test (15 Mins.) a Oracle guy declared test results by announcing the full name of candidates and apologising to others. Very Polite.

3. Then another test for Programming is there.

4. After this they have to go for the round of Interviews.I remembered some questions from the Test Paper:
(I wish this will help others in their preparations)
(THESE QUESTIONS ARE IN RANDOM ORDER)

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

Q. When there is a failure in fetching the rows from a cursor...
A. %ISOPEN
B. %NOTFOUND
C. %FOUND
D. %ROWCOUNT

Q. SELECT ,ORACLE, FROM DUAL WHERE NULL = NULL;
A. ORACLE
B. NULL
C. ERROR OUT
D. NO ROWS SELECTED

Q. There 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?

Q. Which of the following operator is not used in Outer Join?
a. =
b. !=
c. AND
d. OR

Q. PL/SQL uses which of the following
a. Early Binding
b. Late binding
c. No Binding
d. Deferred Binging

Q. followin is a database trigger,

CREATE OR REPLACE TRIGGER delete_row
ON DELETE did not remember the complete code for this ...
....

if table contains 100 rows and it is truncated, how many rows get
updated
a. 0
b. 1
c. 100
d. No rows updated




Oracle Exam Model Paper

1. Three beauty pageant finalists-Cindy, Amy and Linda-The winner was musician. The one who was not last or first was a math major. The one who came in third had black hair. Linda had red hair. Amy had no musical abilities. Who was first?
(A) Cindy (B) Amy (C) Linda (D) None of these

2. Two twins have certain peculiar characteristics. One of them always lies on Monday, Wednesday, Friday. The other always lies on Tuesdays, Thursday and Saturdays. On the other days they tell the truth. You are given a conversation.
Person A- today is Sunday, my name is Anil
Person B-today is Tuesday, my name is Bill What day is today?
(A) Sunday (B) Tuesday (C) Monday (D) Thursday

3. The difference of a number and its reciprocal is 1/2.The sum of their squares is
(A) 9/4 (B) 4/5 (C) 5/3 (D) 7/4

4. The difference of a number and its square is 870.What is the number?
(A) 42 (B) 29 (C) 30 (D) 32

5. A trader has 100 Kg of wheat, part of which he sells at 5% profit and the rest at 20% profit. He gains 15% on the whole. Find how much is sold at 5% profit?
(A) 60 (B) 50 (C) 66.66 (D) 33.3

6. Which of the following points are collinear?
(A) (3,5) (4,6) (2,7) (B) (3,5) (4,7) (2,3)
(C) (4,5) (4,6) (2,7) (D) (6,7) (7,8) (2,7)

7. A man leaves office daily at 7pm.a driver with car comes from his home to pick him from office and bring back home. One day he gets free at 5.30 and instead of waiting for driver he starts walking towards home. In the way he meets the car and returns home on car. He reaches home 20 minutes earlier than usual. In how much time does the man reach home usually?
(A) 1 hr 20 min (B) 1 hr (C) 1 hr 10 min (D) 55 min

8. If m:n = 2:3,the value of 3m+5n/6m-n is
(A) 7/3 (B) 3/7 (C) 5/3 (D) 3/5

9. A dog taken four leaps for every five leaps of hare but three leaps of the dog is equal to four leaps of the hare. Compare speed?
(A) 12:16 (B) 19:20 (C) 16:15 (D) 10:12

10. A watch ticks 90 times in 95 seconds. And another watch ticks 315 times in 323 secs. If they start together, how many times will they tick together in first hour?
(A) 100 times (B) 101 times (C) 99 times (D) 102 times

11. The purpose of defining an index is
(A) Enhance Sorting Performance (B) Enhance Searching Performance
(C) Achieve Normalization (D) All of the above

12. A transaction does not necessarily need to be
(A) Consistent (B) Repeatable (C) Atomic (D) Isolated

13. To group users based on common access permission one should use
(A) User Groups (B) Roles (C) Grants (D) None of the above

14. PL/SQL uses which of the following
(A) No Binding (B) Early Binding (C) Late Binding (D) Deferred Binding

15. Which of the constraint can be defined at the table level as well as at the column level
(A) Unique (B) Not Null (C) Check (D) All the above

16. To change the default date format in a SQLPLUS Session you have to
(A) Set the new format in the DATE_FORMAT key in the windows Registry.
(B) Alter session to set NLS_DATE-FORMAT.
(C) Change the Config.ora File for the date base.
(D) Change the User Profile USER-DATE-FORMAT.

17. Which of the following is not necessarily an advantages of using a package rather than independent stored procedure in data base.
(A) Better performance. (B) Optimized memory usage.
(C) Simplified Security implementation. (D) Encapsulation.

18. Integrity constrains are not checked at the time of
(A) DCL Statements. (B) DML Statements.
(C) DDL Statements. (D) It is checked all the above cases.

19. Roll Back segment is not used in case of a
(A) DCL Statements. (B) DML Statements. (C) DDL Statements. (D) all of the above.

20. An Arc relationship is applicable when
(A) One child table has multiple parent relation, but for anyone instance of a child record only one of the relations is applicable.
(B) One column of a table is related to another column of the same table.
(C) A child table is dependent on columns other than the primary key columns of the parent table.
(D) None of the above.

21. What is true about the following C functions?
(A) Need not return any value. (B) Should always return an integer.
(C) Should always return a float. (D) Should always return more than one value.

22. enum number { a=-1, b=4, c,d,e,} what is the value of e?
(A) 7 (B) 4 (C) 5 (D) 3

23. Which of the following about automatic variables within a function is correct?
(A) Its type must be declared before using the variable. (B) They are local.
(C) They are not initialized to zero. (D) They are global.

24. Consider the following program segment
int n, sum=5;
switch(n)
{
case 2:sum=sum-2;
case 3:sum*=5;
break;
default:sum=0;
}
if n=2, what is the value of the sum?
(A) 0 (B) 15 (C) 3 (D) None of these.

25. Which of the following is not an infinite loop?
(A) x=0; (B) # define TRUE 0....
do{ While(TRUE){....}
/*x unaltered within the loop*/ (C) for(;;) {....}
....}
While(x==0); (D) While(1) {....}

26. Output of the following program is
main()
{
int i=0;
for(i=0;i<20;i++) i="3;" i="func(i);" i="func(i);" g1="First String" g1="g();" b="&a[2];" ab="x;">left->right->data
ans: r->data
9:explain const char *ptr and char *const ptr
remaining i didn`t remember

aptiude
15 quant apti from rs agrval
15 verbal apti,
in this 4 are odd word out
and 4 are sentese ordering when jumbled senteses given
and 4 are reasoning

Model Questions From the Exam conducted by Oracle Bangalore in 2002.

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


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

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

4. Consider the following C program and chose collect answer
#include
void main( )
{
inta[10],k;
for(k=0;k<10;k++)>
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

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


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

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

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

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


11. what is the memory structure employed by recursive functions in a C pgm?
a. B tree
b. Hash table
c. Circular list
d. Stack


12. 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;
10:}
what are the lines that cause compilation errors?
a.7
b.8
c.6 and 7
d.no errors

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

No comments:

2008 Placement papers of Top MNC companies

eXTReMe Tracker