Computer Science and Information Technology
GATE CSE format:mcq PYQs
Build your understanding with focused practice from past exam papers.
Questions 311–320 of 534. Imported answers require independent review unless marked reviewed.
Question 35
Open questionCSMCQ2 marksNeeds review
Consider the two statements.
There exist random variables
and
such that
For all random variables
and
,
Which one of the following choices is correct?
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 35
Open questionCSMCQ2 marksNeeds review
Consider the following ANSI C program:
#include <stdio.h>
#include <stdlib.h>
struct Node{
int value;
struct Node *next;};
int main(){
struct Node *box, *head, *boxN; int index = 0;
box = head = (struct Node *) malloc(sizeof(struct Node));
head->value = index;
for (index = 1; index <= 3; index++){
boxN = (struct Node *) malloc(sizeof(struct Node));
box->next = boxN;
boxN->value = index;
box = boxN; }
for (index = 0; index <= 3; index++) {
printf("Value at index %d is %d\n", index, head->value);
head = head->next;
printf("Value at index %d is %d\n", index+1, head->value); } }
Which one of the statements below is correct about the program?
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 36
Open questionCSMCQ2 marksNeeds review
Let
be an undirected unweighted connected graph. The diameter of
is defined as:
Let
be the adjacency matrix of
.
Define graph
on the same set of vertices with adjacency matrix
, where
Which one of the following statements is true?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 36
Open questionCSMCQ2 marksNeeds review
Consider the following two statements about regular languages:
: Every infinite regular language contains an undecidable language as a subset.
: Every finite language is regular.
Which one of the following choices is correct?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 37
Open questionCSMCQ2 marksNeeds review
Consider the following ANSI C program.
#include <stdio.h>
int main()
{
int i, j, count;
count = 0;
i = 0;
for (j = -3; j <= 3; j++)
{
if ((j >= 0) && (i++))
count = count + j;
}
count = count + i;
printf("%d", count);
return 0;
}
Which one of the following options is correct?
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 37
Open questionCSMCQ2 marksNeeds review
For two
-dimensional real vectors
and
, the operation
is defined as follows:
Let
be a set of 10-dimensional non-zero real vectors such that for every pair of distinct vectors
,
. What is the maximum cardinality possible for the set
?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 38
Open questionCSMCQ2 marksNeeds review
Consider the following language.
Which one of the following deterministic finite automata accepts
?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 38
Open questionCSMCQ2 marksNeeds review
For a statement
in a program, in the context of liveness analysis, the following sets are defined:
: the set of variables used in
: the set of variables that are live at the entry of
: the set of variables that are live at the exit of
Consider a basic block that consists of two statements,
followed by
. Which of the following statements is correct?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 39
Open questionCSMCQ2 marksNeeds review
For a Turing machine
,
denotes an encoding of
. Consider the following two languages.
Which one of the following options is correct?
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 39
Open questionCSMCQ2 marksNeeds review
For constants
and
, consider the following recurrence defined on the non-negative integers:
Which one of the following options is correct about the recurrence
?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