Time Left - 40:00 mins

BARC full Mock-8

Attempt now to get your rank among 154 students!

Question 1

What will be the output of the following C code if the input entered as first and second number is 5 and 6 respectively?

#include<stdio.h>

#include<stdlib.h>

main()

{

int *p;

p=(int*)calloc(3*sizeof(int));

printf("Enter first number\n");

scanf("%d",p);

printf("Enter second number\n");

scanf("%d",p+2);

printf("%d%d",*p,*(p+2));

free(p);

}

Question 2

The Output of below code is-

Question 3

What are the time complexities of finding 8th element from beginning and 8th element from end in a singly linked list?

Let n be the number of nodes in linked list, you may assume that n > 8.

Question 4


         }

What is the output of above program?

Question 5

A subnet has been assigned a subnet mask of 255.255.255.192 . What is the maximum number of hosts that can belong to this subnet?

Question 6

A bit stream 10110001 is transmitted using the standard CRC method, if generator polynomial is x3 + 1 , which is the following bit stream is received by the receiver if there is no noise.

Question 7

Let G be a simple undirected planar graph on 10 vertices with 15 edges. If G is a connected graph, then the number of bounded faces in any embedding of G on the plane is equal to :

Question 8

In how many ways can six different coins be divided between two students so that each student receives at least one coin?

Question 9

Which one of the following statements is FALSE?

Question 10

Which of the following is unreachable state?

Question 11

Finite automata requires minimum __________number of stacks.

Question 12

For an input string having ‘n’ symbols which is recognized by the Mealy machine and its equivalent Moore machine, how many number of output symbols will be there for Mealy and Moore machine respectively.

Question 13

Which of the following is not a valid deadlock prevention scheme?

Question 14

If file size is large and if it is to be accessed randomly then which of the following allocation strategy should be best to use in a system?

Question 15

Data block of a very large file in the Unix file system are allocated using which type of allocation method?

Question 16

What will be the cardinality of the cross product of R X S?

Question 17

In cross product which of the following is true?

Question 18

The tuples of the relations can be of ________ order.

Question 19

The term _______ is used to refer to a row.

Question 20

Consider the following statements:

(i) Any Dynamic Programming algorithm with n subproblems will run in O(n) time.

(ii) Dynamic programming solves a problem faster than greedy method.

(iii) Unlike greedy algorithms, dynamic programming methods always provide correct/optimal solution.

Which of the above statement/s is/are correct?

Question 21

Dynamic programming is an algorithm design method that can be used when the solution to a problem can be viewed as the result of a sequence of………....

Question 22

A population consists of the five numbers . Calculate the mean & standard deviation of the population.

Question 23

In a batch of three students marks obtained in a certain test are 50, 60 and 70. The standard deviation of the marks obtained in test is

Question 24

ALU, bus and all registers are identical in size. The instruction ‘Memory write’ has the register transfer interpretation. Find the minimum number of clock cycles needed for execution of the following instruction.

Question 25

CPU consist of _______.

Question 26

Whenever the data is found in the cache memory it is called as _________

Question 27

Calculate the first() for the given grammar:

S → AaAb / BbBa

A → ∈

B → ∈

Question 28

Find first of A in the following grammar:

A aB|c|B

B c|d

Question 29

How is a J-K flip-flop made to toggle?

Question 30

The D flip-flop has _______ input.

  • 154 attempts
  • 0 upvotes
  • 0 comments
Nov 2GATE & PSU CS