Computer Science and Information Technology
GATE CSE topic:computer-science PYQs
Build your understanding with focused practice from past exam papers.
Questions 751–760 of 975. Imported answers require independent review unless marked reviewed.
Question 26
Open questionCSMCQ2 marksNeeds review
Consider the following C function.
void convert(int n){
if(n<0)
printf("%d",n);
else {
convert(n/2);
printf("%d",n%2);
}
}
Which one of the following will happen when the function convert is called with any positive integer n as argument?
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 27
Open questionCSMCQ2 marksNeeds review
Consider the following C program:
#include <stdio.h>
int r(){
static int num=7;
return num--;
}
int main(){
for (r();r();r())
printf("%d",r());
return 0;
}
Which one of the following values will be displayed on execution of 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 28
Open questionCSMCQ2 marksNeeds review
Consider three machines M, N, and P with IP addresses 100.10.5.2, 100.10.5.5, and 100.10.5.6 respectively. The subnet mask is set to 255.255.255.252 for all the three machines. Which one of the following 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 29
Open questionCSMCQ2 marksNeeds review
Suppose that in an IP-over-Ethernet network, a machine X wishes to find the MAC address of another machine Y in its subnet. Which one of the following techniques can be used for this?
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 30
Open questionCSMCQ2 marksNeeds review
Consider three 4-variable functions
,
, and
, which are expressed in sum-of-minterms as
,
,
. For the following circuit with one AND gate and one XOR gate, the output function f can be expressed as:
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 31
Open questionCSMCQ2 marksNeeds review
Which one of the following languages over
is NOT context-free?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 32
Open questionCSMCQ2 marksNeeds review
Let the set of functional dependencies
hold on a relation schema
.
is not in BCNF. Suppose
is decomposed into two schemas
and
, where
and
. Consider the two statements given below.
I. Both
and
are in BCNF
II. Decomposition of
into
and
is dependency preserving and lossless
Which of the above statements is/are 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 33
Open questionCSMCQ2 marksNeeds review
Assume that in a certain computer, the virtual addresses are 64 bits long and the physical addresses are 48 bits long. The memory is word addressable. The page size is 8 kB and the word size is 4 bytes. The Translation Look-aside Buffer (TLB) in the address translation path has 128 valid entries. At most how many distinct virtual addresses can be translated without any TLB miss?
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 34
Open questionCSMCQ2 marksNeeds review
Consider the following sets:
S1. Set of all recursively enumerable languages over the alphabet
S2. Set of all syntactically valid C programs
S3. Set of all languages over the alphabet
S4. Set of all non-regular languages over the alphabet
Which of the above sets are uncountable?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 first order predicate formula
:
Here ‘
’ denotes that ‘
divides
’, where
and
are integers. Consider the following sets:
S1.
S2. Set of all positive integers
S3. Set of all integers
Which of the above sets satisfy
?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