Complete GATE CSE 2022 Paper 1 overview, original pages and practice · Timed previous-paper practice

Questions 19–21 of 65. Imported answers require review unless explicitly marked reviewed.

Paper practice 65 questionsPage 7 of 22

Question 19

Open question
CSMCQ1 markNeeds review
Consider the following threads, T₁, T₂, and T₃ executing on a single processor, synchronized using three binary semaphore variables, S₁, S₂, and S₃, operated upon using standard wait() and signal(). The threads can be context switched in any order and at any time.
Diagram for Computer Science and Information Technology question 19

Which initialization of the semaphores would print the sequence BCABCABCA....?
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 answer

Question 20

Open question
CSMCQ1 markNeeds review
Consider the following two statements with respect to the matrices

,

,

and

.
Statement 1:

Statement 2:

where

represents the trace of a matrix. Which one of the following holds?
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 answer

Question 21

Open question
CSMCQ1 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 answer