Email: bbcnoun@gmail.com Whatsapp: 08131667008 CIT341 Question: Which of the following is a valid value in Boolean data type ? Answer: ALARM Question: What is the output after executing the following code fragment: int [] x = {1,2,3,4,51; System.out.println(x[0]) Answer: 1 Question: Which of the following sets all cells of a five-element array to the value of 10? Answer: int x[5]={10,10,10,10,10}; Question: Consider a hash table of size 5, with starting index zero. If after inserting the sequence 1,2,3,4 the content of the table is 2,_,3,1,4 what is a possible hash function used? Note that â€~_’ denotes an empty location in the table. Answer: H(x)=(2x+1)mod5 Question: Which of the following is an abstract datatype? Answer: List Question: The following sequence of operations are performed on an empty Queue Q: ADD(1 ,Q), ADD(2,Q), REMOVE(Q), ADD(1 ,Q), ADD(2,Q), REMOVE(Q), REMOVE(Q), REMOVE(Q), ADD(2,Q), REMOVE(Q). The sequence of the removed values are? Answer: 1,2,1,2,2 Question: Which of the following is not a primitive data type in Java? Answer: String Question: Which of the following is a best way of declaring x as a two-dimension array in java? Answer: int[|n x = new int[10][20]; Question: The collection of values and operations allowed on those values is known as Answer: Data type Question: Which of the following data structures uses FIFO method? Answer: Queue Email: bbcnoun@gmail.com Whatsapp: 08131667008