You are on page 1of 5

Practice/ Mock Test Day-1

Q.1 What will be the output of the following program using dynamic scope and call by
reference respectively?

int n;

void a(int x){

x++;

printf(“%d”,x);

Void b(int n){

n=10;

a(n);

main(){

int n=2;

a(n);

b(n);

(A) 3 4 (B) 2 3 (C) 3 11 (D) 2 11

Q.2 Consider a 256KB direct mapped byte addressable cache. If one word is 4 bytes and each
cache block contains 16 words, then determine the number of bits required for tag. (Assume the
physical address of computer is 32 bits)

(A) 12 (B) 13 (C) 14 (D) 15

Q.3 In getting the minimal expression for the function f(A,B,C,D)=∑(1,5,6,7,11,12,13,15),


which of the following is not a prime implicant?

(A) ABC‟ (B) A‟C‟D (C) BD (D) A‟ BD


Q.4 The size of key field along with the record pointer of a B-tree is 6B. What will be the
degree of the B-tree if disk blocks are of size 512 B and block pointers are of size 4B ?

(A) 43 (B) 44 (C) 51 (D) 52

Statement for Linked Answer Questions: 5 & 6

Q.5 What will the buffer frames in the current window of „A‟ just after the time-out and what
are the values of X and Y if go-back-n ARQ sliding window protocol is used?

(A) Buffer frames of A: 2345601 X=2 Y=3

(B) Buffer frames of A: 1234567 X=1 Y=2

(C) Buffer frames of A: 2345670 X=2 Y=3

(D) Buffer frames of A: 1234560 X=1 Y=2


Q.6 If Selective Repeat sliding window protocol is used, than what will be the buffer frames
in the current window of „ A „ just after time-out and what are the values of X and Y?

(A) Buffer frames of A: 2567 X=2 Y=3

(B) Buffer frames of A: 1234 X=1 Y=5

(C) Buffer frames of A: 2345 X=2 Y=3

(D) Buffer frames of A: 2345 X=2 Y=5

Q.7

How many parse trees can be generated to get the string “aabbccdd” from above grammar?

(A) 1 (B) 2 (C) 3 (D) 4


Statement for Linked Answer Questions: 8 & 9

The latencies for each stage in a single cycle processor is given as

IF ID ALU MEM WB

40ns 15ns 40ns 40ns 15ns

Q.8 Determine the speedup obtained from pipelining.

(A) 2.5 (B) 3.2 (C) 3.75 (D) 4.1

Q.9 What will be the change in speedup if ALU operation takes 10% more time?

(A) It increases by 0.5 (B) It increases by 0.25

`(C) It increases by 0.5 (D) It does not change

Statement for Linked Answer Questions: 10 & 11

A company is planning to design a JAVA compiler and has estimated the total source
Code to be of 1,00,000 LOC. Assume that the project follows Basic COCOMO model
and has to be developed within tight constraints.

Q.10 What will be the total effort required?

(A) 904 PM (B) 896 PM (C) 888 PM (D) 880 PM

Q.11 What will be the development time?

(A) 20 Months (B) 22 Months (C) 25 Months (D) 24Months


ANSWER KEY

Q.1 C

Q.2 C

Q.3 D

Q.4 C

Q.5 C

Q.6 D

Q.7 B

Q.8 C

Q.9 B

Q.10 A

Q.11 B

You might also like