Question 71
if (fork() == 0) { a = a + 5; printf(“%d,%d\\n”, a, &a); } else { a = a –5; printf(“%d, %d\\n”, a, &a); }Let u, v be the values printed by the parent process, and x, y be the values printed by the child process. Which one of the following is TRUE?
Question 72
Question 73
Question 74
Let E1 and E2 be two entities in an E/R diagram with simple single-valued attributes. R1 and R2 are two relationships between E1 and E2, where R1 is one-to-many and R2 is many-to-many. R1 and R2 do not have any attributes of their own. What is the minimum number of tables required to represent this situation in the relational model?
Question 75
A C ----- 2 4 3 4 4 3 5 2 7 2 9 5 6 4The set of all tuples that must be additionally deleted to preserve referential integrity when the tuple (2,4) is deleted is:
Question 76
select title from book as B where (select count(*) from book as T where T.price > B.price) < 5
Question 77
Consider a relation scheme R = (A, B, C, D, E, H) on which the following functional dependencies hold: {A–>B, BC–>D, E–>C, D–>A}. What are the candidate keys of R?
Question 78
Consider the following data path of a CPU.
The, ALU, the bus and all the registers in the data path are of identical size. All operations including incrementation of the PC and the GPRs are to be carried out in the ALU. Two clock cycles are needed for memory read operation - the first one for loading address in the MAR and the next one for loading data from the memory bus into the MDR 79.
The instruction “call Rn, sub” is a two word instruction. Assuming that PC is incremented during the fetch cycle of the first word of the instruction, its register transfer interpretation is
Rn < = PC + 1; PC < = M[PC];
The minimum number of clock cycles needed for execution cycle of this instruction is.
Question 79
Rn < = PC + 1; PC < = M[PC];The minimum number of CPU clock cycles needed during the execution cycle of this instruction is:
Question 80
Consider the following C-function:
double foo (int n){
int i;
double sum;
if (n = = 0) return 1.0;
else{
sum = 0.0;
for (i = 0; i < n; i++)
sum += foo (i);
return sum;
}
}
The space complexity of the above function is:
There are 90 questions to complete.