GATE CSE
For all GATE CSE Questions
Toggle navigation
GATE Overflow
Facebook Login
Google Login
or
Email or Username
Password
Remember
Login
Register

I forgot my password
All Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous
Blogs
New Blog
Exams
First time here? Checkout the
FAQ
!
x
×
Close
Use the google search bar on side panel. It searches through all previous GATE/other questions.
Recent activity by srestha
User srestha
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
User srestha
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
0
answers
1
BARC2017
L1 and L2 cache access time 2ns and 5ns respt. Hit percentage 3% and 5% respt. If Average access time =2.4ns then memory access time=?
commented
1 hour
ago
in
CO & Architecture

9
views
0
answers
2
C Programming(interview)
Write an algorithm of the given problem Given a chess board of order NxM and source points (s1,s2) and destination points (d1,d2), Your task to find min number of moves required by the Knight to go to the destination cell.
commented
1 hour
ago
in
Programming

61
views
programminginc
cprogramming
0
answers
3
C programming doubt
I am getting segmentation fault for the following code.Please help to rectify. #include <stdio.h> #include <stdlib.h> struct person { int age; float weight; char *name; }; int main() { struct person *ptr; int i, num; printf("Enter number of ... ;%s\t%d\t%.2f\n", ptr>name[i], (ptr+i)>age, (ptr+i)>weight); return 0; }
edited
1 hour
ago
in
Programming

7
views
0
answers
4
C Programming (interview)
WAP where smallest subarrays with sum greater than x? Say an array={1,5,6,2,45,17}; Now, x=60 Now we have to find smallest subarray which is greater than x
commented
2 hours
ago
in
Programming

56
views
programminginc
output
cprogramming
0
answers
5
Peter Linz Exercise 5.1
Find context free grammars for the following languages (with n>=0, m>=0, k>=0) (a) L={anbmck : n=m or m<=k} (b) L={ anbmck : n=m or m≠k} (c) L={anbmck : k=n+m } (d) L={ anbmck : n+2m=k} (e) L={anbmck : k=nm } (f) L={ w ∈ {a,b,c}* : na(w)+nb(w)≠nc(w) } (g) L={ anbmck : k≠n+m } (h) L= { anbmck : K>=3}
commented
14 hours
ago
in
Theory of Computation

72
views
theoryofcomputation
grammar
2
answers
6
Peter Linz Exercise 5.1
Is the following language contextfree? L= { uvwvR : u,v,w∈ {a,b}+ u = w =2 } If yes, provide set of productions for the same.
answer selected
2 days
ago
in
Theory of Computation

31
views
theoryofcomputation
grammar
1
answer
7
let r1=(a+bb)* , r2=(a*+b* ), r3=(aa+b)* which 0f the following is true?
answer selected
3 days
ago
in
Theory of Computation

29
views
2
answers
8
DIGITAL LOGIC DESIGN
answer selected
3 days
ago
in
Digital Logic

40
views
2
answers
9
c programming
#include <stdio.h> int K = 4; int a[2]; unsigned int m; int* check(unsigned int n) { int res = 1; int count = 0; for(int i=0;i<K;i++) if(!(n&(1<<i))) { count++; res = 0; } a[0] = res; a[1] = count; return a; } int foo( ... = x[1]; foo(mi,i+1); return count; } int main() { int x = foo(0,0); printf("%d\n",x); } value of x ___ ?
answered
3 days
ago
in
Programming

66
views
programminginc
0
answers
10
IITM interview
Lets say we have a 32bit instruction using immediate addressing mode, where the opcode is say 22bits, and u have to store a 32bit operand inside the remaining 10bits of the instruction. How would u do it?
commented
5 days
ago
in
CO & Architecture

176
views
interview
iitminterview
1
answer
11
Network Layer
In case of network layer, which among the following is incorrect? A)ISO X.25 B)DNU C)IP D)X25 PLP
commented
5 days
ago
in
Computer Networks

47
views
1
answer
12
Kenneth Rosen Edition7 Ch1 Ex1 QueNo23
commented
5 days
ago
in
Mathematical Logic

153
views
mathematicallogic
kennethrosen
1
answer
13
IIITHPGEE
how many way we can select 4 candies from 6 different groups?
commented
Mar 16
in
Set Theory & Algebra

91
views
iiithpgee
puzzles
discretemathematics
0
answers
14
Program (ritchie)
Write a program to determine the ranges of char, short, int, and long variables, both signed and unsigned, by printing appropriate values from standard headers and by direct computation. Harder if you compute them: determine the ranges of the various floatingpoint types.
asked
Mar 15
in
Programming

29
views
programminginc
1
answer
15
source
void fun(int **pptr) { int q = 10; *pptr = &q; } int main() { int r = 20; int *p = &r; fun(&p); printf("%d", *p); return 0; } The output of the program is 10 . But as q here is an automatic variable, the result shouldn't be 10.
commented
Mar 15
in
Programming

149
views
0
answers
16
set theory
commented
Mar 13
in
Set Theory & Algebra

30
views
discretemathematics
sets
settheory&algebra
engineeringmathematics
2
answers
17
set theory
commented
Mar 13
in
Set Theory & Algebra

28
views
discretemathematics
settheory&algebra
engineeringmathematics
5
answers
18
GATE201717
The nbit fixedpoint representation of an unsigned real number $X$ uses $f$ bits for the fraction part. Let $i = nf$. The range of decimal values for $X$ in this representation is (A) $2^{f}$ to $2^{i}$ (B) $2^{f}$ to $\left ( 2^{i}  2^{f} \right )$ (C) 0 to $2^{i}$ (D) 0 to $\left ( 2^{i}  2^{f} \right )$
commented
Mar 11
in
Digital Logic

605
views
gate20171
digitallogic
numberrepresentation
fixedpointrepresentation
6
answers
19
GATE2017108
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 ... the end of list n. (C) cause a null pointer dereference for all inputs. (D) append list n to the end of list m for all inputs.
commented
Mar 10
in
Programming

1.7k
views
gate20171
datastructure
linkedlists
programming
normal
2
answers
20
algorithm
finf the tc T(n)=nlogn +T(n1)
answer selected
Mar 9
in
Algorithms

49
views
6
answers
21
GATE2017148
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 ____________.
commented
Mar 9
in
Algorithms

1.1k
views
gate20171
algorithms
normal
numericalanswers
2
answers
22
graph theory
commented
Mar 9
in
Graph Theory

50
views
graphtheory
discretemathematics
graphconnectivity
engineeringmathematics
2
answers
23
TECHTUD, C PROGRAMMING
commented
Mar 8
in
Programming

124
views
programminginc
output
1
answer
24
worst case in quck sort
Consider a scenario of modified quick sort, where we have given an input sorted array A[1 . . . n], all elements of array are distinct and n ≥ 3. Pivot is the median of set of 3 elements [First element, middle element, and last element]. What will be ... Ο(n logn) Ο(n2 logn) Ο(n log log n) I think it will be B but they have given as A....???
commented
Mar 8
in
Algorithms

98
views
5
answers
25
GATE2017135
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); ... n); } The output printed when $\text{fun1}(5)$ is called is (A) $53423122233445$ (B) $53423120112233$ (C) $53423122132435$ (D) $53423120213243$
commented
Mar 7
in
Programming

888
views
gate20171
programming
normal
tricky
0
answers
26
token ring
A token ring LAN network interconnects M stations using Star Topology in the following way. All the Input and Output lines of the token ring Station interface are connected to a cabinet where the actual ring is placed. Suppose that distance from each ... by stations , if stations are allowed to transmit an unlimited number of packets/token.(v=2*10^8 m/s).
commented
Mar 7
in
Computer Networks

68
views
2
answers
27
ISRO 2016 Number of trials [Mech]
answer selected
Mar 7
in
Probability

44
views
engineeringmathematics
isro
isromech
1
answer
28
propositional logic
Translate the statement into logical expressions using predicates, quantifiers, and logical connectives "No student in your class has taken a course in logic programming" A) ∀x( C(x)>NOT(L(x)) ) B) NOT (∃x (C(x) AND L(x)) ) C) Either A) or B) D) None of the above
answer selected
Mar 7
in
Mathematical Logic

73
views
propositionallogic
discretemathematics
mathematicallogic
firstorderlogic
engineeringmathematics
4
answers
29
GATE2017153
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" ... defined in string.h as returning a value of type size_t, which is an unsigned int. The output of the program is __________ .
commented
Mar 6
in
Programming

1.4k
views
gate20171
programming
programminginc
numericalanswers
signedunsignedcomparison
normal
1
answer
30
ISRO 2006 ECE Venn Diagrams
The Boolean expression for the shaded area in the Venn diagram is a) X'+Y' +Z b) XY'Z + X'YZ c) X + Y + Z d) X'Y'Z+XY
answer selected
Mar 4
in
Mathematical Logic

36
views
isro
isroece
digitallogic
2
answers
31
Token Ring
A fiber Optic token Ring used as a MAN is 200 km Long and runs at 100 Mbps . After sending a frame, a Station drains the frame from the ring before regenerating the token. The signal propagation speed in the fibre is 200,000 km/sec and maximum frame size is 1 KB . What is the Maximum Efficiency at N=1 ?
answered
Mar 2
in
Computer Networks

41
views
1
answer
32
ISRO 2008 ECE minimum number of NAND Gates
commented
Mar 2
in
Digital Logic

45
views
isro
isroece
digitallogic
1
answer
33
gate 2017
actual marks 62.33 set 1 gate 2017 normalized marks 69.37 Score 852.91 Rank Estimate 85  118 i am a general category student should i expect a call from iit bombay for 2 year mtech plan or what other colleges i should prefer thank you
commented
Mar 1
in
GATE Application

160
views
gate2017
3
answers
34
Manipulation of sum
Prove the identity: $$\begin{align*} &\sum_{i=0}^{n}\sum_{j=0}^{i} a_ia_j = \frac{1}{2}\left ( \left ( \sum_{i=0}^{n}a_i \right )^2 + \left ( \sum_{i=0}^{n}a_i^2 \right )\right ) \end{align*}$$
comment edited
Mar 1
in
Combinatory

123
views
discretemathematics
summation
2
answers
35
Discrete Math
Prove or disprove: $\begin{align*} \log_8x = \frac{1}{2}.\log_{2}x \end{align*}$.
answered
Feb 25
in
Set Theory & Algebra

67
views
discretemathematics
descriptive
nongate
2
answers
36
Stable sorting algorithms
Show that any comparison based sorting algorithm can be made stable without increasing its complexity beyond a constant factor.
answered
Feb 22
in
Algorithms

89
views
algorithms
descriptive
timecomplexity
nongate
1
answer
37
probability
How many people have to be in a room in order that the probability that at least two of them celebrate their birthday in the same month is at least $1/2$ ? Assume that all possible monthly outcomes are equally likely.
answer selected
Feb 21
in
Numerical Ability

55
views
probability
engineeringmathematics
discretemathematics
aptitude
3
answers
38
Congestion avoidance in TCP
During Congestion avoidance(Additive Increase) in tcp when 3 duplicate ACKs arrived then during that arrival phase by which algorithm did the sender window adopt increment procedure? a) Sender window uses additive increase b)Sender window uses slow start which option is correct?
comment edited
Feb 19
in
Computer Networks

86
views
computernetworks
tcp
congestioncontrol
3
answers
39
GATE2017154
asked
Feb 14
in
Theory of Computation

324
views
toc
2
answers
40
GATE2017155
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); }
asked
Feb 14
in
Programming

914
views
gate20171
programming
programminginc
normal
numericalanswers
21,446
questions
26,759
answers
60,943
comments
22,955
users