Computer Science and Information Technology
GATE CSE format:mcq PYQs
Build your understanding with focused practice from past exam papers.
Questions 151–160 of 534. Imported answers require independent review unless marked reviewed.
Question 13
Open questionCSMCQ1 markNeeds review
Consider the following C program. Assume parameters to a function are evaluated from right to left.
#include <stdio.h>
int g(int p) { printf("%d", p); return p; }
int h(int q) { printf("%d", q); return q; }
void f(int x, int y) {
g(x);
h(y);
}
int main() {
f(g(10),h(20));
}
Which one of the following options is the CORRECT output of the above C 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 14
Open questionCS1MCQ1 markNeeds review
Consider a permutation sampled uniformly at random from the set of all permutations of
for some
. Let
be the event that 1 occurs before 2 in the permutation, and
the event that 3 occurs before 4. 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 14
Open questionCSMCQ1 markNeeds review
The format of a single-precision floating-point number as per the IEEE 754 standard is:
Sign (1bit) | Exponent (8 bits) | Mantissa (23 bits)
Choose the largest floating-point number among the following options.
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 15
Open questionCS1MCQ1 markNeeds review
Which one of the following statements is FALSE?
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 15
Open questionCSMCQ1 markNeeds review
Let
be the recurrence relation defined as follows:
and
for
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 16
Open questionCS1MCQ1 markNeeds review
A user starts browsing a webpage hosted at a remote server. The browser opens a single TCP connection to fetch the entire webpage from the server. The webpage consists of a top-level index page with multiple embedded image objects. Assume that all caches (e.g., DNS cache, browser cache) are all initially empty. The following packets leave the user’s computer in some order.
(i) HTTP GET request for the index page
(ii) DNS request to resolve the web server’s name to its IP address
(iii) HTTP GET request for an image object
(iv) TCP SYN to open a connection to the web server
Which one of the following is the CORRECT chronological order (earliest in time to latest) of the packets leaving the computer?
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 16
Open questionCSMCQ1 markNeeds review
Let
be a continuous function from
to
such that
Which one of the following options is the CORRECT value of
?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 17
Open questionCS1MCQ1 markNeeds review
Given an integer array of size N, we want to check if the array is sorted (in either ascending or descending order). An algorithm solves this problem by making a single pass through the array and comparing each element of the array only with its adjacent elements. The worst-case time complexity of this algorithm is
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 17
Open questionCSMCQ1 markNeeds review
Let
be the adjacency matrix of a simple undirected graph
. Suppose
is its own inverse. Which one of the following statements is always 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 18
Open questionCS1MCQ1 markNeeds review
Consider the following C program:
#include <stdio.h>
int main(){
int a = 6;
int b = 0;
while(a < 10) {
a = a / 2 + 1;
a += b;}
printf("%d", a);
return 0;}
Which one 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 answer