Daily Exam Programmer 13-10-2024

Join us on Telegram


Q 1:

In a schema with attributes A, B, C, D and E following set of functional dependencies are given;

A->B

A->C

CD->E

B->D

E->A

Which of the following functional dependencies is NOT implied by the above set?

(1) AC->BC
(2) BD->CD
(3) BC->CD
(4) CD->AC
Correct Answer: BD->CD

Q 2: Which of these keywords is used by a class to use an interface defined previously?
(1) import
(2) implements
(3) export
(4) None of the above
Correct Answer: implements

Q 3:

. Which of these access specifiers can be used for an interface?

(1) Public
(2) Private
(3) Protected
(4) All of the above
Correct Answer: Public

Q 4:

Consider the following program written in Java:

class DoWhile{

public static void main(String args[])

{

int j=0;

do{

int k=7;

System.out.println(k);

k+=7;

}

j++;

509

while(j<3);

}

What would be the output of the program if it is executed?

(1) 7 8 9
(2) 7 7 7
(3) 7 14 21
(4) 7 15 22
Correct Answer: 7 7 7

Q 5:

COCOMO-II was developed at

(1) University of Maryland
(2) University of Southern California
(3) IBM
(4) AT and T Bell Labs
Correct Answer: University of Southern California

Q 6: What do we call a network whose elements may be separated by some distance, it usually involves tow or more small networks and dedicated high speed telephone lines?
(1) URL
(2) LAN
(3) WAN
(4) WWW
Correct Answer: LAN

Q 7: ATM breaks all traffic into 53-Byte cells because
(1) 53-Byte cells are the ideal size for the voice communication
(2) 53-Byte cells are the ideal size for data communication
(3) 53-Byte cells are the ideal size for circuit switching
(4) 53-Byte cells are the compromised size for both voice and data communication
Correct Answer: 53-Byte cells are the compromised size for both voice and data communication

Q 8: Consider a relation schema R = (A, B, C, D, E, H on which the following functional dependencies hold: {AB, BC→D, E->C, D->A). What are the candidate keys of R?
(1) AEH, BEH, DEH
(2) AE, BE, DE
(3) AEH, BEH, BCH
(4) AE, BE
Correct Answer: AEH, BEH, DEH

Q 9: The correct SQL statement for creating an index is?
(1) INDEX ID;
(2) INDEX ON ID,
(3) CREATE INDEX ON ID;
(4) CREATE INDEX ID;
Correct Answer: CREATE INDEX ON ID;

Q 10: Which of the following is incorrect statement about packages?
(1) All variables in interface are implicitly final and static.
(2) Interfaces are specified public if they are to be accesssed by any code in the program.
(3) Interfaces specify what class must do but not how it does.
(4) All variables are static and methods are public if inteface is defined public
Correct Answer: All variables are static and methods are public if inteface is defined public