GATE 2022 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2022

65 questions

MCQ 32 · MSQ 15 · NAT 181-mark 30 · 2-mark 35

Questions 21–25 of 65

Q21Array and Pointer1 markMCQ−0.33 if wrong
What is printed by the following ANSI C program?

#include <stdio.h>
int main(int argc, char *argv[])
{
int x = 1, z[2] = {10, 11};
int *p=NULL; p=&x;
*p=10;
p =&z[1];
*(&z[0]+1)+=3;
printf("%d, %d, %d \n",x,z[0],z[1]); return   0;
}

Q22Network Layer Protocol1 markMCQ−0.33 if wrong
Consider an enterprise network with two Ethernet segments, a web server and a firewall, connected via three routers as shown below.
To InternetFirewallRouterRouterRouterWeb ServerEthernetEthernet
What is the number of subnets inside the enterprise network?

Q23Recursive Language1 markMSQ
Which of the following statements is/are TRUE?

One or more options are correct.

Q24Cache Memory1 markMSQ
Let WB and WT be two set associative cache organizations that use LRU algorithm for cache block replacement. WB is a write back cache and WT is a write through cache. Which of the following statements is/are FALSE?

One or more options are correct.

Q25Relational Algebra1 markMSQ
Consider the following three relations in a relational database.
Employee(eId,Name),Brand(bId,bName),Own(eId,bId)Employee(eId, Name), Brand (bId, bName), Own(eId ,bId)
Which of the following relational algebra expressions return the set of eIdseIds who own all the brands?

One or more options are correct.