Time Left - 01:00:00 mins

# BARC 2020: Full Length Mock 2 (App update required to attempt this test)

Attempt now to get your rank among 419 students!

Question 1

A hash table of length 10 is taken for insertion of the keys with hash function h(key)= key mod 10. If Collision occurs, it is resolved with quadratic probing. The following sequence of keys are inserted:
46, 36, 34, 24, 52, 57, 56
Which of the following cannot be inserted to the table due to quadratic probing?

Question 2

What is time complexity of job sequencing with deadline(Using Greedy approach)?

Question 3

If we run Dijkstra’s single source shortest path algorithm for the following edge weighted directed graph with vertex 5 as the source

In what order do the nodes get included into the set of vertices for which the shortest path distances are finalized

5, 6, 7, 8, 4, 3, 2, 1

Question 4

What is minimum weight spanning tree of the given graph?

Question 5

In Prim's algorithm , we use decrease key operation. What is the time complexity of this decrease key operation in case of Prim's Algorithm :

Question 6

Consider following three statements from the program to move the last node of linked list to front of the linked list.

1) p-->next = null;

2) s1-->next = s;

3) s = s1;

where s points to the first node, s1 points to the last node and p points to the previous node( 2nd last node). which order of these three statements will provide the exact functionality to move last node to front.

Question 7

More than one binary search tree can be drawn if following is given

Question 8

Consider a function implementing functionality of finding prefix and postfix together and applied over a tree having n nodes. The time complexity of the above function will be

Question 9

What will be the prefix expression corresponding the given expression?
a + b + c * d / e ^ f ^ g * h

Question 10

Match the following data structures and their applications?
1) Stack
2) Queue
4) Trees
List-I
p. Serving request of singled shared resource
q. Implementing other data structures
r. Recursive function
s. Implementing algorithms

Question 11

Which of the following defines the referencing environment.

Question 12

Consider the following function
void function (int * A, int n)
{
if (n! = 0)
{
printf (“%d”, A[n – 1]);
function (A + 1, n – 1);
}
}
Find the third output produced by the function call function (A, 5), and A is an array initially holds {10, 20, 30, 40, 50}.

Question 13

If the below program instructions are to be done in C, than what will be the output available?
main()
{
int i=1;
printf("%d%d%d",i,++i,i++);
}

Question 14

Consider the following statements:
Statement 1: It is possible to generate both clustered as well as primary index for a given file at a same time.
Statement 2: When Sorting of file is done it is possible to sort it on the basis of single key only.
Which of the following is true?

Question 15

Consider the relation emp (ename, sex, salary) and following relational algebra.

If emp1 and emp2 are renames of relation emp, then above query evaluates females employee with __________

Question 16

Relation R has atleast one simple candidate key and it is also given that R is in BCNF. Which of the following statement is true?

Question 17

Which classes are used for connection-less socket programming?

Question 18

Which of the following property that digital signature cannot satisfy?

Question 19

Consider the following system, where a source S is connected to destination D via 3 network devices as shown in diagram. Determine how many times, each packet has to visit network layer and application layer respectively during a transmission from S to D?

Question 20

Which one of the following devices reduces both collision domain and Broadcast domain to zero?

Question 21

Consider the following statements regarding Diffie- Hellman Key exchange cryptography:
1) Authentication in the Diffie- Hellman key exchange can be broken using reflection attack.
2) Diffie-Hellman suffers from man in the middle attack.
3) If n be the number of nodes in the network, then using no of keys required for one to one communication between each and every node is n.
Which of the following are false?

Question 22

The IEEE single-precision and double-precision format to represent floating-point numbers, has a length of ______ and ______ respectively.

Question 23

Which of the following it true?

Question 24

Consider a 4-way set associative mapping with 8 cache blocks, the order of memory references are (0,11,49,9,23,11,8,27). Which of the given references will not present after all memory references if Least frequently used (LFU) is used?

Question 25

Consider the following floating-point format:

S: Sign bit

E: Exponent

M: Mantissa

The value of floating-point number in this system is,

V = (-1)s ×2E-127 × 1.F

Then what is the corresponding decimal value if the floating-point stored is: 3F800000

Question 26

Consider the following programs that produce the same result when executed on a stack CPU. Among these two programs which is superior (in terms of stack size)

Question 27

Suppose a disk has 100 cylinders numbered from 0 to 99. Initially, the disk arm is at cylinder 50, and following is the queue of disk accesses requests:

10, 63, 98, 50, 20, 35, 65.

If SSTF is used for scheduling the disk accesses, then the request for cylinder 20 is served after how many requests?

Question 28

Consider the following page reference stream.
a, b, c, a, b, d, a, d, b, c, b
How many pages fault occurs using optimal (min) page replacement policy, if memory has 3 empty frames.

Question 29

Suppose a processor uses round robin scheduling algorithm to schedule the process. Previously, it was using time slice of 2 units while scheduling the process. An update is made to the system and time slice now changed to 4 units. Then the turnaround time of the process will

Question 30

Consider the following data:

If LRTF is used for scheduling these process to the CPU, than Time at which process P3 will complete is __________

Question 31

Consider the regular expression: R=(ab|abb)*bbab

Which of the following string in not in the set denoted by R?

Question 32

Consider the below statements regarding Mealy/Moore machines :

S1: Mealy Machine has high power than the Moore machine.

S2: Mealy Machine has less number of states than the Moore machine.

Which of the following is correct?

Question 33

Consider the following statements :
S1 : DCFL's are closed under complement
S2 : DCFL's are closed under Homomorphism
S3 : DCFL's are closed under union with regular
Which option is correct ?

Question 34

Consider the below statements :

S1 : A regular language L1 has 3 states in its DFA , then the  complement of L1 will also have 3 states in its DFA.

S2 : A context free language L2 has 4 states in its PDA. The complement of L2 will also have 4 states in its PDA.

Question 35

Consider the following grammar -
E -> EsEs/Bcc/cC/F
C -> b/epsilon
The number of productions in simplified CFG is _____. Fill in the blank -

Question 36

Find the number of tokens in the following C program-
int main() {
char 1d='a';
int b=10;
/* Adding the two times of a number b
int c= b+b;
/*result is 20*/
printf("%d",c);
}

Question 37

Consider the following grammar -
S -> ABa/BAc
A -> d/e/epsilon
B -> f/epsilon
Which of the following is true regarding the FIRST() & FOLLOW() function of LL(1) parser?

Question 38

Consider the following grammar.
EE(T)|T
TT*F|id
F(id)
Which of the following can be correct handle in bottom up parsing for the above grammar?

Question 39

The function

can be written as:

Question 40

For the ring counter shown in the following figure, the MOD number of counter will be __, if the initial state of counters is 1110(i.e. Q3Q2Q1Q0=1110)

Question 41

Let the frequency of the clock signal applied to the flip-flop be 10 kHz. If the flip-flop is T- flip flop with a negative edge-triggered clock signal and T=1 and the previous state was made clear, the frequency of the output signal will be?

Question 42

Consider the following statement about XOR and XNOR gate
a. The minimum no. of NAND gates required to realize XOR is 4 and the minimum no. of NOR gates required to realize XOR is 5.
b. The minimum no. of NAND gates required to realize XOR is 5 and the minimum no. of NOR gates required is 4.
c. The minimum no. of NAND gates required to realize XNOR is 4 and the minimum no. of NOR gates required is 5.
d. The minimum no. of NAND gates required to realize XNOR is 5 and the minimum no. of NOR gates required is 4.
Which of them is true?

Question 43

The statement, ”Every ice cream is cold” where I(x) is “x is a ice cream ” and C(x) is “x is cold” and the domain consists of all sweets.

Question 44

The number of proper subsets of the set {1, 2, 3} is

Question 45

Consider following statements

Statement 1- Inverse of any element in Group G is unique.

Statement 2- Subgroup of a graph G is closed under union and intersection property.

Statement 3- Every group pf prime order is abelian group.

Statement 4- Every group of even order always contain one element of order 2.

Number of statements are correct is

Question 46

Identity matrix is ____

Question 47

For the function f(x) =, the maximum occurs when x is equal to _____.

Question 48

SRS consists of

Question 49

Which one of the following tests is not a black box testing.

Question 50

What are the main building blocks of all XML documents?
• 419 attempts