Time Left - 40:00 mins

BARC full Mock-7

Attempt now to get your rank among 182 students!

Question 1

What will be the output of the following C code?

#include <stdio.h>

void main()

{

int b = 6;

int c = 7;

int a = ++b + c--;

printf("%d", a);

}

Question 2

Which of the following is true about return type of functions in C?

Question 3

The concatenation of two list can performed in O(1) time. Which of the following variation of linked list can be used?

Question 4

Which of the following algorithm is best suitable for sorting of linked list?

Question 5

Which addresses can be given to devices in network 131.107.0.0 with a standard class B subnet mask?

(i) 131.107.255.255

(ii) 131.107.0.1

(iii) 131.107.1.0

(iv) 131.107.0.0

Question 6

The Hamming distance between 001111 and 010011 is

Question 7

A graph with n vertices and n-1 edges that is not a tree, is?

Question 8

If there are 6 science books and 5 history books, in how many ways can they be arranged such that all the science books as well as all the history books are together?

Question 9

Let P, Q, R be a regular expression over If P does not contain null string, then has a unique solution _______.

Question 10

Can a Deterministic Finite State machine simulate a Non-Deterministic Finite State machine?

Question 11

The number of states in the minimal deterministic finite automaton corresponding to the regular expression (0 + 1)*(10) is ____________

Question 12

Consider the following statements regarding mealy & Moore machines:

Statement I : In mealy machine the present output depends only on the present state

Statement II : In Moore machine, the present output depends an present state as well as present input.

Question 13

If there are 100 units of resource R in the system and each process in the system requires 2 units of resource R, then how many processes can be present at maximum so that no deadlock will occur?

Question 14

A disk drive has 200 cylinders, numbered 0 to 199. Disk requests come to the disk driver for cylinders 82,170,43,140,24,16 and 190. The driver is currently serving a request at a cylinder 50. How much seek time is needed for FCFS algorithm?

Question 15

Disks requests come to a disk driver for cylinders 10, 20, 30, 40, 46 and 60, in that order. The disk drive is currently reading from cylinder 5. If the seek time is 5 ms per cylinder then determine the total seek time(in ms) if FCFS scheduling algorithm is used.

Question 16

Let R = (A, B, C, D, E, F) be a relation scheme with the following dependencies-

C → F

E → A

EC → D

A → B

Which of the following is a key for R?

Question 17

A relation R(A,B,C,D,E,F) holds the following FDs:
AB→C
C→D
D→EA
E→F
F→B 
Find the number of candidate keys of R?

Question 18

The term attribute refers to a ___________ of a table.

Question 19

The tuples of the relations can be of ________ order.

Question 20

Consider the following graph.

Assume starting vertex is A. What is the cost of optimal tour by travelling salesperson using the dynamic programming?

Question 21

The following program fragment is written in a programming language that allows global variables and does not allow nested declarations of functions.

global int i = 100, j = 5;
void P(x)
{

    int i = 10;
    print(x + 10);
    i = 200;
    j = 20;
    print (x);
}

main()
{
    P(i + j);
}
If the programming language uses static scoping and call by need parameter passing mechanism, the values printed by the above program are

Question 22

X is a continuous random variable with probability density function given by

The mean of the random variable X is

Question 23

 of the total washers produced in a particular manufacturing process turn out to be faulty. Determine the probability that in a sample of 10 washers selected at random, exactly 2 will be defective, by using the Poisson approximation to the binomial distribution.

Question 24

The addressing mode used in an instruction of the form ADD R1,R2 is _______. (R1 and R2 are registers in a computer system)

Question 25

Consider the following statements:

(i) Execution time for single instruction on six stage pipelined CPU is less than or equal to identical non-pipelined CPU.
(ii) In a uniform delay pipeline execution time is equal to the execution time of non-pipelined.

Question 26

How many address lines are needed to address each memory location in a 2048 X 4 memory chip?

Question 27

Consider the following grammar

P QR

Q +P | *R | t |

R id

In the predictive parser table M of the grammar the entries M[P, $], M[P, id], M[Q, $] and M[Q, id] are respectively.
Note : { } represents blank entry.

Question 28

Consider the grammar

E  E + n | E × n | n

For a sentence n + n × n, the handles in the right-sentential form of the reduction are

Question 29

Which of the following is a digital switch which selects one of the many inputs to a single output:

Question 30

4 to 1 MUX would have ____________.

  • 182 attempts
  • 0 upvotes
  • 1 comment
Jul 19GATE & PSU CS