• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE CSE 2023

Question 61

An 8-way set associative cache of size 64 KB (1 KB = 1024 bytes) is used in a system with a 32-bit address. The address is subdivided into TAG, INDEX, and BLOCK OFFSET.

The number of bits in the TAG is__________
 

  • 16

  • 17

  • 18

  • 19

Question 62

The forwarding table of a router is shown below.

Subnet NumberSubnet MaskInterface ID 
200.150.0.0255.255.0.01
200.150.64.0255.255.224.02
200.150.68.0255.255.255.03
200.150.68.64255.255.255.2444
Default 0

A packet addressed to a destination address 200.150.68.118 arrives at the router. It will be forwarded to the interface with ID

  • 1

  • 2

  • 3

  • 4

Question 63

Consider a database of fixed-length records, stored as an ordered file.  The database has  25,000  records,  with each record being 100  bytes,  of which the primary key occupies  15  bytes.  The data file is block-aligned in that  each  data record is fully contained within a  block.  The database is indexed by a  primary index file,  which is also stored as  a  block-aligned ordered file.  The  figure below  depicts  this  indexing scheme

[caption width="800"]Tree[/caption]

Suppose the block size of the file system is 1024 bytes, and a pointer to a block occupies 5 bytes. The system uses binary search on the index file to search for a record with a given key. You may assume that a binary search on an index file of b blocks takes log b block accesses in the worst case.

Given a key, the number of block accesses required to identify the block in the data file that may contain a record with the key, in the worst case, is ____________

  • 1

  • 6

  • 3

  • 4

Question 64

The output of a 2-input multiplexer is connected back to one of its inputs as shown in the figure.

[caption width="800"]imgIMG2[/caption]

Match the functional equivalence of this circuit to one of the following options.

  • D Flip flop

  • D Latch

  • Half Adder

  • Demultiplexer

Question 65

Consider the C function foo and the binary tree shown.

[caption width="800"]IMGIMG[/caption]
typedef struct node {
    int val;
    struct node *left, *right;
} node;
 
int foo(node *p) {
    int retval;
    if (p == NULL)
        return 0;
    else {
        retval = p->val + foo(p->left) + foo(p->right);
        printf("%d ", retval);
        return retval;
    }
}

When foo is called with a  pointer to the root node of the  given binary tree, what will it print?

  • 3 8 5 13 11 10

  • 3 5 8 10 11 13

  • 3 8 16 13 24 50

  • 3 16 8 50 24 13

There are 65 questions to complete.

Last Updated :
Take a part in the ongoing discussion