menu
Recent questions tagged gate2017-1
Login
Register
My account
Edit my Profile
Private messages
My favorites
Register
Recent questions tagged gate2017-1
All Activity
Q&A
Questions
Unanswered
Tags
Categories
Users
Ask a Question
Blogs
Previous Year
Exams
Recent questions tagged gate2017-1
0
votes
0
answers
51
views
GATE-2017 set-01
Errors violating the condition ‘any variable must be declared before its use’ are detected during semantic analysis. Why cannot it come under syntax analysis? Does declaration not fall under Syntax?
GreyMatter
asked
in
Compiler Design
Jul 14, 2021
by
GreyMatter
5
points
51
views
register-allocation
gate2017-1
compiler-design
syntax
intermediate-code
0
votes
1
answer
96
views
GATE2017-1-51 Video Solution
Consider a $2-$way set associative cache with $256$ blocks and uses $LRU$ replacement. Initially the cache is empty. Conflict misses are those misses which occur due to the contention of multiple blocks for the same cache set. Compulsory misses occur due ... $10$ times. The number of conflict misses experienced by the cache is _________ .
admin
asked
in
CO & Architecture
Apr 18, 2020
by
admin
585
points
96
views
gate2017-1
co-and-architecture
cache-memory
conflict-misses
normal
numerical-answers
video-solution
1
vote
1
answer
31
views
GATE2017-1-45 Video Solution
The values of parameters for the Stop-and-Wait ARQ protocol are as given below: Bit rate of the transmission channel = $1$ Mbps. Propagation delay from sender to receiver = $0.75$ ms. Time to process a frame = $0.25$ ms. Number of ... (expressed in percentage) of the Stop-and-Wait ARQ protocol for the above parameters is _____________ (correct to $2$ decimal places).
admin
asked
in
Computer Networks
Apr 18, 2020
by
admin
585
points
31
views
gate2017-1
computer-networks
stop-and-wait
numerical-answers
normal
video-solution
0
votes
0
answers
17
views
GATE2017-1-27 Video Solution
A multithreaded program $P$ executes with $x$ number of threads and uses $y$ number of locks for ensuring mutual exclusion while operating on shared memory locations. All locks in the program are non-reentrant, i.e., if a thread holds a lock $l$, then it cannot re-acquire lock $l$ without releasing it. If ... : $x = 1, y = 2$ $x = 2, y = 1$ $x = 2, y = 2$ $x = 1, y = 1$
admin
asked
in
Operating System
Apr 18, 2020
by
admin
585
points
17
views
gate2017-1
operating-system
process-synchronization
normal
video-solution
0
votes
0
answers
28
views
GATE2017-1-36 Video Solution
Consider the C functions foo and bar given below: int foo(int val) { int x=0; while(val > 0) { x = x + foo(val--); } return val; } int bar(int val) { int x = 0; while(val > 0) { x= ... result in: Return of $6$ and $6$ respectively. Infinite loop and abnormal termination respectively. Abnormal termination and infinite loop respectively. Both terminating abnormally.
admin
asked
in
Programming
Apr 18, 2020
by
admin
585
points
28
views
gate2017-1
programming-in-c
programming
normal
video-solution
0
votes
0
answers
19
views
GATE2017-1-08 Video Solution
Consider the C code fragment given below. typedef struct node { int data; node* next; } node; void join(node* m, node* n) { node* p = n; while(p->next != NULL) { p = p->next; } p->next = m; } Assuming that m and n point to ... append list m to the end of list n. cause a null pointer dereference for all inputs. append list n to the end of list m for all inputs.
admin
asked
in
DS
Apr 18, 2020
by
admin
585
points
19
views
gate2017-1
data-structures
linked-lists
normal
video-solution
0
votes
0
answers
25
views
GATE2017-1-53 Video Solution
Consider the following C program. #include<stdio.h> #include<string.h> void printlength(char *s, char *t) { unsigned int c=0; int len = ((strlen(s) - strlen(t)) > c) ? strlen(s) : strlen(t); printf("%d\n", len); } ... defined in $string.h$ as returning a value of type $size\_t$, which is an unsigned int. The output of the program is __________ .
admin
asked
in
Programming
Apr 18, 2020
by
admin
585
points
25
views
gate2017-1
programming
programming-in-c
normal
numerical-answers
video-solution
0
votes
0
answers
18
views
GATE2017-1-44 Video Solution
In a RSA cryptosystem, a participant $A$ uses two prime numbers $p = 13$ and $q = 17$ to generate her public and private keys. If the public key of $A$ is $35$, then the private key of $A$ is __________ .
admin
asked
in
Computer Networks
Apr 18, 2020
by
admin
585
points
18
views
gate2017-1
network-security
computer-networks
rsa-security-networks
numerical-answers
normal
video-solution
1
vote
1
answer
23
views
GATE2017-1-42 Video Solution
In a database system, unique timestamps are assigned to each transaction using Lamport's logical clock. Let $TS(T_{1})$ and $TS(T_{2})$ be the timestamps of transactions $T_{1}$ and $T_{2}$ respectively. Besides, $T_{1}$ ... starvation-free. The database system is starvation-free, but not deadlock-free. The database system is neither deadlock-free nor starvation-free.
admin
asked
in
Databases
Apr 18, 2020
by
admin
585
points
23
views
gate2017-1
databases
timestamp-ordering
deadlock
normal
video-solution
0
votes
0
answers
23
views
GATE2017-1-54 Video Solution
A cache memory unit with capacity of $N$ words and block size of $B$ words is to be designed. If it is designed as a direct mapped cache, the length of the TAG field is 10 bits. If the cache unit is now designed as a 16-way set-associative cache, the length of the TAG field is ____________ bits.
admin
asked
in
CO & Architecture
Apr 18, 2020
by
admin
585
points
23
views
gate2017-1
co-and-architecture
cache-memory
normal
numerical-answers
video-solution
0
votes
0
answers
24
views
GATE2017-1-25 Video Solution
Consider a two-level cache hierarchy with $L1$ and $L2$ caches. An application incurs $1.4$ memory accesses per instruction on average. For this application, the miss rate of $L1$ cache is $0.1$; the $L2$ cache experiences, on average, $7$ misses per $1000$ instructions. The miss rate of $L2$ expressed correct to two decimal places is ________.
admin
asked
in
CO & Architecture
Apr 18, 2020
by
admin
585
points
24
views
gate2017-1
co-and-architecture
cache-memory
numerical-answers
video-solution
0
votes
0
answers
24
views
GATE2017-1-52 Video Solution
Consider the expression $(a-1) * (((b+c)/3)+d)$. Let $X$ be the minimum number of registers required by an optimal code generation (without any register spill) algorithm for a load/store architecture, in which only load ... instructions can have memory operands and arithmetic instructions can have only register or immediate operands. The value of $X$ is _____________ .
admin
asked
in
Compiler Design
Apr 18, 2020
by
admin
585
points
24
views
gate2017-1
compiler-design
register-allocation
normal
numerical-answers
video-solution
0
votes
0
answers
20
views
GATE2017-1-13 Video Solution
Consider the following C code: #include<stdio.h> int *assignval (int *x, int val) { *x = val; return x; } void main () { int *x = malloc(sizeof(int)); if (NULL == x) return; x = assignval (x,0); if (x) ... $x == NULL$ and not as shown. compiles successfully but execution may result in dangling pointer. compiles successfully but execution may result in memory leak.
admin
asked
in
Programming
Apr 18, 2020
by
admin
585
points
20
views
gate2017-1
programming-in-c
programming
video-solution
0
votes
0
answers
28
views
GATE2017-1-55 Video Solution
The output of executing the following C program is _______________ . #include<stdio.h> int total(int v) { static int count = 0; while(v) { count += v&1; v >>= 1; } return count; } void main() { static int x=0; int i=5; for(; i>0; i--) { x = x + total(i); } printf("%d\n", x); }
admin
asked
in
Programming
Apr 18, 2020
by
admin
585
points
28
views
gate2017-1
programming
programming-in-c
normal
numerical-answers
video-solution
0
votes
0
answers
23
views
GATE2017-1-31 Video Solution
Let $A$ be $n\times n$ real valued square symmetric matrix of rank 2 with $\sum_{i=1}^{n}\sum_{j=1}^{n}A^{2}_{ij} =$ 50. Consider the following statements. One eigenvalue must be in $\left [ -5,5 \right ]$ The eigenvalue with ... than 5 Which of the above statements about eigenvalues of $A$ is/are necessarily CORRECT? Both I and II I only II only Neither I nor II
admin
asked
in
Linear Algebra
Apr 18, 2020
by
admin
585
points
23
views
gate2017-1
linear-algebra
eigen-value
normal
video-solution
0
votes
0
answers
20
views
GATE2017-1-43 Video Solution
Consider the following grammar: stmt $\rightarrow$ if expr then expr else expr; stmt | $0$ expr $\rightarrow$ term relop term | term term $\rightarrow$ id | number id $\rightarrow$ a | b | c number $\rightarrow [0-9]$ where relop is a relational ... program if $e_1$ then $e_2$ else $e_3$ has $2$ control flow paths. $e_1 \rightarrow e_2$ and $e_1 \rightarrow e_3$.
admin
asked
in
Compiler Design
Apr 18, 2020
by
admin
585
points
20
views
gate2017-1
compiler-design
parsing
normal
numerical-answers
video-solution
0
votes
0
answers
23
views
GATE2017-1-39 Video Solution
Let $A$ and $B$ be finite alphabets and let $\#$ be a symbol outside both $A$ and $B$. Let $f$ be a total function from $A^{*}$ to $B^{*}$. We say $f$ is computable if there exists a Turing machine $M$ which given an input ... $L_{f}$ is recursive, but not conversely. If $f$ is computable then $L_{f}$ is recursively enumerable, but not conversely.
admin
asked
in
Theory of Computation
Apr 18, 2020
by
admin
585
points
23
views
gate2017-1
theory-of-computation
decidability
difficult
video-solution
0
votes
0
answers
17
views
GATE2017-1-41 Video Solution
Consider a database that has the relation schemas EMP(EmpId, EmpName, DeptId), and DEPT(DeptName, DeptId). Note that the DeptId can be permitted to be NULL in the relation EMP. Consider the following queries on the database expressed in tuple relational calculus. {$t$ | ... } Which of the above queries are safe? I and II only I and III only II and III only I, II and III
admin
asked
in
Databases
Apr 18, 2020
by
admin
585
points
17
views
gate2017-1
databases
relational-calculus
safe-query
normal
video-solution
0
votes
0
answers
18
views
GATE2017-1-19 Video Solution
Let $X$ be a Gaussian random variable with mean 0 and variance $\sigma ^{2}$. Let $Y$ = $\max\left ( X,0 \right )$ where $\max\left ( a,b \right )$ is the maximum of $a$ and $b$. The median of $Y$ is ______________ .
admin
asked
in
Probability
Apr 18, 2020
by
admin
585
points
18
views
gate2017-1
probability
numerical-answers
normal-distribution
video-solution
0
votes
0
answers
19
views
GATE2017-1-3 Video Solution
Let $c_{1}.....c_{n}$ be scalars, not all zero, such that $\sum_{i=1}^{n}c_{i}a_{i}$ = 0 where $a_{i}$ are column vectors in $R^{n}$. Consider the set of linear equations $Ax = b$ ... has a unique solution at $x=J_{n}$ where $J_{n}$ denotes a $n$-dimensional vector of all 1. no solution infinitely many solutions finitely many solutions
admin
asked
in
Linear Algebra
Apr 18, 2020
by
admin
585
points
19
views
gate2017-1
linear-algebra
system-of-equations
normal
video-solution
0
votes
0
answers
17
views
GATE2017-1-50 Video Solution
Instruction execution in a processor is divided into 5 stages, Instruction Fetch (IF), Instruction Decode (ID), Operand fetch (OF), Execute (EX), and Write Back (WB). These stages take 5, 4, 20, 10 and 3 nanoseconds (ns) ... The speedup (correct to two decimal places) achieved by EP over NP in executing 20 independent instructions with no hazards is _________ .
admin
asked
in
CO & Architecture
Apr 18, 2020
by
admin
585
points
17
views
gate2017-1
co-and-architecture
pipelining
normal
numerical-answers
video-solution
0
votes
0
answers
20
views
GATE2017-1-22 Video Solution
Consider the language $L$ given by the regular expression $(a+b)^{*} b (a+b)$ over the alphabet $\{a,b\}$. The smallest number of states needed in a deterministic finite-state automaton (DFA) accepting $L$ is ___________ .
admin
asked
in
Theory of Computation
Apr 18, 2020
by
admin
585
points
20
views
gate2017-1
theory-of-computation
finite-automata
numerical-answers
minimal-state-automata
video-solution
0
votes
0
answers
29
views
GATE2017-1-02 Video Solution
Consider the first-order logic sentence $F:\forall x(\exists yR(x,y))$. Assuming non-empty logical domains, which of the sentences below are implied by $F$? $\exists y(\exists xR(x,y))$ $\exists y(\forall xR(x,y))$ $\forall y(\exists xR(x,y))$ $¬\exists x(\forall y¬R(x,y))$ IV only I and IV only II only II and III only
admin
asked
in
Mathematical Logic
Apr 18, 2020
by
admin
585
points
29
views
gate2017-1
mathematical-logic
first-order-logic
video-solution
0
votes
0
answers
16
views
GATE2017-1-7 Video Solution
The n-bit fixed-point representation of an unsigned real number $X$ uses $f$ bits for the fraction part. Let $i = n-f$. The range of decimal values for $X$ in this representation is $2^{-f}$ to $2^{i}$ $2^{-f}$ to $\left ( 2^{i} - 2^{-f} \right )$ 0 to $2^{i}$ 0 to $\left ( 2^{i} - 2^{-f} \right )$
admin
asked
in
Digital Logic
Apr 18, 2020
by
admin
585
points
16
views
gate2017-1
digital-logic
number-representation
fixed-point-representation
video-solution
0
votes
0
answers
19
views
GATE2017-1-35 Video Solution
Consider the following two functions. void fun1(int n) { if(n == 0) return; printf("%d", n); fun2(n - 2); printf("%d", n); } void fun2(int n) { if(n == 0) return; printf("%d", n); fun1(++n); printf("%d", n); } The output printed when $\text{fun1}(5)$ is called is $53423122233445$ $53423120112233$ $53423122132435$ $53423120213243$
admin
asked
in
Programming
Apr 18, 2020
by
admin
585
points
19
views
gate2017-1
programming
normal
tricky
recursion
video-solution
0
votes
0
answers
21
views
GATE2017-1-48 Video Solution
Let $A$ be an array of $31$ numbers consisting of a sequence of $0$'s followed by a sequence of $1$'s. The problem is to find the smallest index $i$ such that $A\left [i \right ]$ is $1$ by probing the minimum number of locations in $A$. The worst case number of probes performed by an optimal algorithm is ____________.
admin
asked
in
Algorithms
Apr 18, 2020
by
admin
585
points
21
views
gate2017-1
algorithms
normal
numerical-answers
searching
video-solution
0
votes
0
answers
15
views
GATE2017-1-18 Video Solution
Threads of a process share global variables but not heap heap but not global variables neither global variables nor heap both heap and global variables
admin
asked
in
Operating System
Apr 18, 2020
by
admin
585
points
15
views
gate2017-1
operating-system
threads
video-solution
0
votes
0
answers
27
views
GATE2017-1-30 Video Solution
Let $u$ and $v$ be two vectors in R2 whose Euclidean norms satisfy $\left \| u \right \| = 2\left \| v \right \|$. What is the value of $\alpha$ such that $w = u + \alpha v$ bisects the angle between $u$ and $v$? $2$ $\frac{1}{2}$ $1$ $\frac{ -1}{2}$
admin
asked
in
Linear Algebra
Apr 18, 2020
by
admin
585
points
27
views
gate2017-1
linear-algebra
normal
vector-space
video-solution
0
votes
0
answers
10
views
GATE2017-1-10 Video Solution
Consider the following context-free grammar over the alphabet $\Sigma = \{a,b,c\}$ with $S$ as the start symbol:$S \rightarrow abScT \mid abcT$$T \rightarrow bT \mid b$ ... $\{\left ( ab \right )^{n}\left ( cb^{n} \right )^{m} \mid m,n \geq 1 \}$
admin
asked
in
Theory of Computation
Apr 18, 2020
by
admin
585
points
10
views
gate2017-1
theory-of-computation
context-free-languages
normal
video-solution
0
votes
0
answers
24
views
GATE2017-1-15 Video Solution
A sender $S$ sends a message $m$ to receiver $R$, which is digitally signed by $S$ with its private key. In this scenario, one or more of the following security violations can take place. $S$ can launch a birthday attack to replace $m$ ... with a fraudulent message Which of the following are possible security violations? I and II only I only II only II and III only
admin
asked
in
Computer Networks
Apr 18, 2020
by
admin
585
points
24
views
gate2017-1
computer-networks
cryptography
normal
video-solution
0
votes
0
answers
16
views
GATE2017-1-40 Video Solution
Recall that Belady's anomaly is that the page-fault rate may increase as the number of allocated frames increases. Now, consider the following statement: $S1$: Random page replacement algorithm (where a page chosen at random is replaced) suffers from Belady's anomaly. $S2$: LRU ... is true $S1$ is true, $S2$is false $S1$ is false, $S2$is true $S1$ is false, $S2$is false
admin
asked
in
Operating System
Apr 18, 2020
by
admin
585
points
16
views
gate2017-1
page-replacement
operating-system
normal
video-solution
0
votes
1
answer
23
views
GATE2017-1-21 Video Solution
Consider the Karnaugh map given below, where $X$ represents "don't care" and blank represents $0$. Assume for all inputs $\left ( a,b,c,d \right )$ ... available. The above logic is implemented using $2$-input $\text{NOR}$ gates only. The minimum number of gates required is ____________ .
admin
asked
in
Digital Logic
Apr 18, 2020
by
admin
585
points
23
views
gate2017-1
digital-logic
k-map
numerical-answers
normal
video-solution
0
votes
0
answers
16
views
GATE2017-1-14 Video Solution
Consider a TCP client and a TCP server running on two different machines. After completing data transfer, the TCP client calls close to terminate the connection and a FIN segment is sent to the TCP server. Server-side TCP responds by sending an ACK, which ... client-side TCP connection wait for the FIN from the server-side TCP? LAST-ACK TIME-WAIT FIN-WAIT-1 FIN-WAIT-2
admin
asked
in
Computer Networks
Apr 18, 2020
by
admin
585
points
16
views
gate2017-1
computer-networks
tcp
video-solution
0
votes
0
answers
16
views
GATE2017-1-11 Video Solution
Consider the $C$ struct defined below: struct data { int marks [100]; char grade; int cnumber; }; struct data student; The base address of student is available in register $R1$. The field student.grade can be accessed efficiently using: Post-increment ... $X(R1)$, where $X$ is an offset represented in $2's$ complement $16-bit$ representation
admin
asked
in
CO & Architecture
Apr 18, 2020
by
admin
585
points
16
views
gate2017-1
co-and-architecture
addressing-modes
video-solution
0
votes
0
answers
16
views
GATE2017-1-9 Video Solution
When two 8-bit numbers $A_{7}...A_{0}$ and $B_{7}...B_{0}$ in 2's complement representation (with $A_{0}$ and $B_{0}$ as the least significant bits) are added using a ripple-carry adder, the sum bits obtained are $S_{7}...S_{0}$ and the carry bits are $C_{7}...C_{0}$. ... $\left ( A_{0}.B_{0}.\bar{S_{0}}+\bar{A_{0}}.\bar{B_{0}}.S_{0} \right )$ is 1
admin
asked
in
Digital Logic
Apr 18, 2020
by
admin
585
points
16
views
gate2017-1
digital-logic
number-representation
video-solution
0
votes
0
answers
25
views
GATE2017-1-49 Video Solution
Consider a RISC machine where each instruction is exactly $4$ bytes long. Conditional and unconditional branch instructions use PC-relative addressing mode with Offset specified in bytes to the target location of the branch instruction. Further the Offset is ... $i,$ then the decimal value of the Offset is ____________ .
admin
asked
in
CO & Architecture
Apr 18, 2020
by
admin
585
points
25
views
gate2017-1
co-and-architecture
normal
numerical-answers
instruction-execution
video-solution
0
votes
0
answers
17
views
GATE2017-1-20 Video Solution
Let $T$ be a tree with $10$ vertices. The sum of the degrees of all the vertices in $T$ is ________
admin
asked
in
DS
Apr 18, 2020
by
admin
585
points
17
views
gate2017-1
data-structures
trees
numerical-answers
video-solution
0
votes
0
answers
20
views
GATE2017-1-04 Video Solution
Consider the following functions from positive integers to real numbers: $10$, $\sqrt{n}$, $n$, $\log_{2}n$, $\frac{100}{n}$. The CORRECT arrangement of the above functions in increasing order of asymptotic complexity is: $\log_{2}n$, $\frac{100}{n}$, $10$, $\sqrt{n}$, $n$ ... $\sqrt{n}$, $\log_{2}n$, $n$ $\frac{100}{n}$, $\log_{2}n$, $10$, $\sqrt{n}$, $n$
admin
asked
in
Algorithms
Apr 18, 2020
by
admin
585
points
20
views
gate2017-1
algorithms
asymptotic-notations
normal
video-solution
0
votes
0
answers
29
views
GATE2017-1-GA-9 Video Solution
Arun, Gulab, Neel and Shweta must choose one shirt each from a pile of four shirts coloured red, pink, blue and white respectively. Arun dislikes the colour red and Shweta dislikes the colour white. Gulab and Neel like all the colours. In how many different ways can they choose the shirts so that no one has a shirt with a colour he or she dislikes? $21$ $18$ $16$ $14$
admin
asked
in
Numerical Ability
Apr 18, 2020
by
admin
585
points
29
views
gate2017-1
combinatory
numerical-ability
video-solution
1
vote
1
answer
23
views
GATE2017-1-46 Video Solution
Consider a database that has the relation schema CR(StudentName, CourseName). An instance of the schema CR is as given below. ... $T2 \leftarrow CR\div T1$ The number of rows in $T2$ is ______________ .
admin
asked
in
Databases
Apr 18, 2020
by
admin
585
points
23
views
gate2017-1
databases
relational-algebra
normal
numerical-answers
video-solution
Page:
1
2
next »
Ask a Question
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Recent Posts
New GATEOverflow PDFs
Guidelines to users
No Recent Blog Comments
Search GATE CSE Doubts