Time Left - 40:00 mins

BARC full Mock-4

Attempt now to get your rank among 171 students!

Question 1

Consider the following C program:

int main ()


int x = 20;

static int y = x;

if (x = = y)

printf (“Equal”);


printf (“Not Equal”);

return 0;


What will be the output for above C program?

Question 2

The following ‘C’ statement :
int * f [ ] ( );

Question 3

The postfix expression for the infix expression
(A + B *(C + D))/ (F + D * E) is?

Question 4

The equivalent infix expression and value for the postfix form 1 2 + 3 * 4 5 * – will be ___________

Question 5

The main memory of a computer has 2 cm blocks while the cache has 2c blocks. If the cache uses the set associative mapping scheme with 2 blocks per set, then block k of the main memory maps to the set-

Question 6

A computer has a 256 KB, 4-way set associative, write back data cache with block size of 32 bytes. The processor sends 32 bit addresses to the cache controller. Each cache tag directory entry contains in addition to address tag, 2 valid bits, 1 modified bit and 1 replacement bit.

The number of bits in the tag field of an address is?

Question 7

The minimum number of colours that is sufficient to vertex-colour any planar graph is ______.

Question 8

Given the following graphs:

Which of the following is correct?

Question 9

Consider this Context-Free Grammar:

S aSa | bSb | aSb | bSa | ԑ

The language L generated by grammar is?

Question 10

A context free grammar for  L = {w | n0(w) > n1(w) } is given by:

Question 11

The pushdown automata consist of a _____.

Question 12

There exist an equivalent _____ for every pushdown automaton.

Question 13

Given reference to the following pages by a program
0, 9, 0, 1, 8, 1, 8, 7, 8, 7, 1, 2, 8, 2, 7, 8, 2, 3, 8, 3
How many page faults will occur if the program has three page frames available to it and uses an optimal replacement?

Question 14

Determine the number of page faults when references to pages occur in the following order; 1, 2, 4, 5, 2, 1, 2, 4. Assume that the main memory can accommodate 3 pages and the main memory already has the pages 1 and 2, with page 1 having been brought earlier than page 2. (LRU algorithm is used)

Question 15

Which of the following condition stands true for Mutual Exclusion?

Question 16

A solution to the critical-section problem must satisfy which of the following three requirements:

I. Mutual exclusion

II. Progress

III. Race Condition

IV. Bounded waiting

Question 17

Given a block can hold either 3 records or 10 key pointers. If a database contains n records, then how many blocks do we need to hold the data file and the dense index?

Question 18

Consider a B+ tree in which the maximum number of keys in a node is 5. What is the minimum number of keys in any non-root node? 

Question 19

Which of the following is not a transaction state?

Question 20

A hash function f defined as f(key) = key mod 7, with linear probing, insert the keys 37, 38, 72, 48, 98, 11, 56, into indexed from 11 will be stored in the location

Question 21

______ sorting algorithms has the lowest worst-case time complexity.

Question 22

Suppose a system of linear equations which consists of m equations. If the number of variables in a particular equation is n, then which of the following is true regarding the above specification?

Question 23

The system of linear equations
x+y+z=2, 2x+y-z=3, 3x+2y+kz=4
has unique solution if _______?

Question 24

Consider a TCP packet having sequence number field as 1100 and urgent flag is set and also urg pointer field contain 160. Then the total urgent data will be-

Question 25

What is the purpose of the PSH flag in the TCP header?

Question 26

The growth of the congestion window takes place up to?

Question 27

Which of the following is not a machine-independent code optimization technique?

Question 28

How many temporary variables are needed to write the three address code for the expression a + b * c + d.

Question 29

Which of the following is a demerit of asynchronous counter:

Question 30

Glitch (undesirable state) would appear in case of _______
  • 171 attempts