Computer Science Engineering - Online Test

Q1. Let L = L1 ∩ L2, where L1 and Lare languages as defined below:

Then L is 
Answer : Option C
Explaination / Solution:
No Explaination.


Q2. Consider the following relational schema: Suppliers (sid:integer, sname: string, city:string, street: string) Parts (pid:integer, pname: string, color:string) Catalog (sid:integer, pid:integer, cost: real)
Consider the following relational query on the above database:
SELECT S.sname
FROM Suppliers S
WHERE S.sid NOT IN (SELECT C. sid
FROM Catalog C
WHERE C.pid NOT IN (SELECT P.pid
FROM Parts P
WHERE P.color<> ‘blue’)) 
Assume that relations corresponding to the above schema are not empty. Which one of the following is the correct interpretation of the above query?
Answer : Option A
Explaination / Solution:
No Explaination.


Q3.
The Boolean expression for the output f of the multiplexer shown below is 

Answer : Option A
Explaination / Solution:
No Explaination.


Q4. Consider a hypothetical processor with an instruction of type LW R1, 20(R2), which during execution reads a 32-bit word from memory and stores it in a 32-bit register R1. The effective address of the memory location is obtained by the addition of constant 20 and the contents of register R2. Which of the following best reflects the addressing mode implemented by this instruction for the operand in memory?
Answer : Option D
Explaination / Solution:

Here 20 will act as base and content of R2 will be index

Q5. HTML (Hyper Text Markup Language) has language elements which permit certain actions other than describing the structure of the web document. Which one of the following actions is NOT supported by pure HTML (without any server or client side scripting) pages?
Answer : Option D
Explaination / Solution:
No Explaination.


Q6. Consider a 4-way set associative cache (initially empty) with total 16 cache blocks. The main memory consists of 256 blocks and the request for memory blocks is in the following order: 0,255,1,4,3,8,133,159,216,129,63,8,48,32, 73, 92,155 Which one of the following memory block will not be in cache if LRU replacement policy is used?
Answer : Option D
Explaination / Solution:
No Explaination.


Q7. Consider two transactions T1 and T2, and four schedules S1, S2, S3, S4 of T1 and T2 as given below:

Which of the above sche dules are conflict-serializable?
Answer : Option B
Explaination / Solution:
No Explaination.


Q8. The following key values are inserted into a B+-tree in which order of the internal nodes is 3, and that of the leaf nodes is 2, in the sequence given below. The order of internal nodes is the maximum number of tree pointers in each node, and the order of leaf nodes is the maximum number of data items that can be stored in it. The B+-tree is initially empty. 10, 3, 6, 8, 4, 2, 1. The maximum number of times leaf nodes would get split up as a result of these insertions is
Answer : Option C
Explaination / Solution:
No Explaination.


Q9. Consider the following relational schema: Suppliers (sid:integer, sname: string, city:string, street: string) Parts (pid:integer, pname: string, color:string) Catalog (sid:integer, pid:integer, cost: real) Assume that, in the suppliers relation above, each supplier and each street within a city has a unique name, and (sname, city) forms a candidate key. No other functional dependencies are implied other than those implied by primary and candidate keys. Which one of the following is TRUE about the above schema?
Answer : Option B
Explaination / Solution:
No Explaination.


Q10. What does the following program print? 
#include <stdio.h>
void f (int * p, int * g) {
p = q;
* p = 2;
}
int i = 0, j = 1;
int main ( ){
f(&i, & j);
print f ("%d %d \ n", i, j);
return 0;
}
Answer : Option C
Explaination / Solution:
No Explaination.