Saturday, June 7, 2008

Paper 21a

15. A function without any return type declares

return=20

A. Integer
B. Float
C. Void
D. Syntax Error
Ans: A

16.//What is the output of the program
#include
#include
#define sqr(a) a*a
void main()

{

int a=10,b=1,c;
c=sqr(10+1);
printf("Sqr Root of (10+1)is %d",c );
getch();
}
// A. 121
// B. 21
// c. 13
// D. Syntax Error

// Ans: B

17.//What is the output of the program
#include
#include
void main()
{
int i,j=20;
clrscr();
for(i=1;i<3;i++)
{
printf("%d,",i);
continue;
printf("%d",j);
break;
}

getch();

}

// A. 1,20
// B. 1,20,1,20
// c. 1,2
// D. 1,2,20,20

// Ans: c



18.//What is the output of the program
#include
#include
void main()

{

int i=1*4/3-27%3^2+100*0.5-(4>3?1:2);
clrscr();
printf("%d",i);
getch();
}

// A. 49
// B. compile error
// c. 51
// D. 48
// Ans: b



19.What is the output of the program
#include
#include
void main()

{
char *st1[3]= {"Hello","World","Oracle"};
*st1=st1[2];
st1[1]=*st1;
free(st1[0]);
free(st1[1]);
clrscr();

printf("%s %s %s",st1,st1[1],st1[2]);
getch();

}

// A. Garbage Garbage Oracle
// B. oracle oracle oracle
// c. Hello World Oracle
// D. Core Dump:cannot Print after freeing the
memory

// Ans: D



20.Consider the following structure =20
Struct {
int data;
struct node *prev;
struct node *next;

}NODE;



NULL <-- 5 --> 8 --> 10 --> NULL

p <-- q <-- r=20

WHAT WILL BE THE VALUE OF r-->prev-->-->next-->data

?

A. 8

B. Null

C. 5

D. 10

Ans: 10



21. 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"





22. Denormalisation is done to=20

A. Check for Data Integrity

B. Reduce Data Redundancy

C. Intoduce Security Check

D. Increase Query performance .



23. How many columns are retrived from this query:

SELECT address1 || ',' ||address2 ||','

||address2 "Address" FROM =

employee;



A. 3

B. 2

C. 1

D. 0





24. What is the is the result of the fallowing Code

Piece=20

Insert into table A value(a1):

CREATE TABLE B AS SELECT * FROM A;

ROLLBAACK ;

A. Table B gets created with the row inserted in the

first statement.

B. Table B is not created

C. Table B gets created , but no row gets inserted

into Table A

D. Rollback throws up an exception .





25. The key word used in Oracle for string searching

is=20



A. SOUNDEX

B. DECODE

C. LIKE

D. HAVING



26. What does the ROLLBACK statement wil do in the

fool segment of =

code

PROGRAM STARTS HERE

........

SOME DML STAT.

...SAVEPOINT1

SOME DML STAT.

...SAVEPOINT2

SOME DML STAT.

...ROLLBACK

A. Rollback Dml changes to savepoint 1

B. Rollback Dml changes to savepoint 2

C. Rollback Dml changes of the last DML

ststs. just before =

ROllback stats

D. Rollback DML changes to the place whre the

program starts



27. Which clause u use to exclude the rows before

grouping them?

A. Group By

B. Having

C. Where

D. Minus



28. Which of the following statements is not true

about views?

A. u can create a index on views

B. Views donot have permanent data

C. Views can be based on one or more tables

D. Views can be dropped without dropping

tables



29 How many JION conditions are needed in JOIN query

to avoid a =

Cartesian Product?

A. No of tables + 1

B. No of tables - 1

C. No of colums + 1

D. No of colums - 1



30. "An item could be either a component or spare ".

How can u =

represent this scenerio in a E-R=20

A. Subtype Relation

B. Arc Relation

C. Recursive Relation

D. Many to Many

No comments: