Computer Science and Information Technology
GATE CSE year:2022 PYQs
Build your understanding with focused practice from past exam papers.
Questions 21–30 of 65. Imported answers require independent review unless marked reviewed.
Question 21
Open questionCSMCQ1 markNeeds review
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;
n}
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 22
Open questionCSMCQ1 markNeeds review
Consider an enterprise network with two Ethernet segments, a web server and a firewall, connected via three routers as shown below.

What is the number of subnets inside the enterprise network?
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 23
Open questionCSMSQ1 markNeeds review
Which of the following statements is/are TRUE?
Your answerSelect all correct options. You can choose more than one.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 24
Open questionCSMSQ1 markNeeds review
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?
Your answerSelect all correct options. You can choose more than one.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 25
Open questionCSMSQ1 markNeeds review
Consider the following three relations in a relational database.
Which of the following relational algebra expressions return the set of eIds who own all the brands?
Your answerSelect all correct options. You can choose more than one.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 26
Open questionCSMSQ1 markNeeds review
Which of the following statements is/are TRUE with respect to deadlocks?
Your answerSelect all correct options. You can choose more than one.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 27
Open questionCSMSQ1 markNeeds review
Which of the following statements is/are TRUE for a group
?Your answerSelect all correct options. You can choose more than one.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 28
Open questionCSNAT1 markNeeds review
Suppose a binary search tree with 100 distinct elements is also a complete binary tree. The tree is stored using the array representation of binary heap trees. Assuming that the array indices start with 0, the 3rd largest element of the tree is stored at index ____________.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 29
Open questionCSNAT1 markNeeds review
Consider the augmented grammar with
as the set of terminals.
If
is the set of two LR(0) items
, then
contains exactly __________ items.Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 30
Open questionCSNAT1 markNeeds review
Consider a simple undirected graph of 10 vertices. If the graph is disconnected, then the maximum number of edges it can have is ____________.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer