Time Left - 40:00 mins

BARC full Mock-9

Attempt now to get your rank among 134 students!

Question 1

What is the output of this program?

class comma_operator

{

public static void main(String args[])

{

int sum = 0;

for (int i = 0, j = 0; i < 5 & j < 5; ++i, j = i + 1)

sum += i;

System.out.println(sum);

}

}

Question 2

Consider following function:

Nontail (int n)

{

if (n < 0)
 return;

else

{

Nontail (n - 1);

printf ("%d”, n);

Nontail (n - 1);

}

}

What will be the output if n= 3 is passed to the given function?

Question 3

Total number of simple graphs that can be drawn using six vertices are :

Question 4

Consider an integer array arr[0…..n – 1]. What does the following function do on this array, when function is called for do something (arr, 0,n-1, x)?

(Note: x is an integer)

Question 5

Which among the following closely relates to use of PPP?

Question 6

The number of links in a fully mesh topology when number of nodes are 7 is

Question 7

In how many ways can 7 different balls be distributed in 5 different boxes if any box can contain any number of balls except that ball 3 can only be put into box 3 or box 4?

Question 8

If there are 7 boys and 3 girls, in how many ways can they be seated such that no two girls sit next to each other?

Question 9

Consider a system with ‘M’ CPU processors and ‘N’ processes then how many processes can

present in ready, running and blocked state at minimum

Question 10

Consider a system with 8 processes, each process requires maximum of 3 instances of resource ‘R’, what is the maximum value of resources ‘R’ so that system is in deadlock?

Question 11

Consider a system having a page table with 4K entries and logical address is 29 bits then what is the physical address if the system has 512 frames?

Question 12

A process executes the code

fork();

fork();

fork();

The total number of child processes created is

Question 13

Consider the system where initial value of the counting semaphore is 17 then various semaphore operations like 23 P,18 V,16 P,14 V,1 P are performed where P and V are wait and signal operations respectively. The final value of semaphore is

Question 14

Which of the following is wrong ?

Question 15

If L1 and L2 are regular sets then intersection of these two will be :

Question 16

In DBMS, different classes of relations are created using __________ technique to prevent modification anomalies.

Question 17

Which commands are used to control access over objects in relational database?

Question 18

The relation with the attribute which is the primary key is referenced in another relation. The relation which has the attribute as a primary key is called

Question 19

Which of the following is false:
S1: NoSQL databases have very narrow focus as it is mainly designed for storage but it provides very little functionality
S2: Backup is a great plus point for some NoSQL databases

Question 20

Which one of the following is the recurrence equation for the worst case time complexity of finding Kth smallest element in an array of size ‘n’ using partition function? Assume ‘c’ is constant.

Question 21

The minimum number of comparisons required to find the minimum and maximum of 50 numbers is ________.

Question 22

An urn B1 contains 2 white and 3 black chips and another urn B2 contains 3 white and 4 black chips. One urn is selected at random and a chip is drawn from it. If the chip drawn is found black, find the probability that the urn chosen was B1.

Question 23

A box has 6 black, 4 red, 2 white and 3 blue shirts. Find the probability of drawing 2 black shirts if they are picked randomly?

Question 24

Match List-I with List-II and select the correct answer using the codes given below the lists:

List-I - List-II

a. 0-address instruction -  1) T = TOP (T - 1)

b. 1-address instruction  - 2) Y = Y + X

c. 2-address instruction  - 3) Y = A – B

d. 3-address instruction  - 4) ACC = ACC – X

Question 25

If a RAM chip has n address input lines then it can access memory locations upto:

Question 26

If each address space represents one byte of storage space, how many address lines are needed to access RAM chips arranged in a 4 x 6 array, where each chip is 8K x 4 bits ?

Question 27

Which of the following is true?

Question 28

Consider the statement:

I. Every regular grammar is LL(1)

II. Every LL(1) grammar is LALR(1)

III. A context free grammar without left factoring and left recursion can be ambiguous

Question 29

The race around condition occurs in a level trigger J-K flip-flop when

Question 30

An n-variable K-map usually have
  • 134 attempts
  • 1 upvote
  • 2 comments
Sep 7GATE & PSU CS