The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
GATE Overflow
Facebook Login
or
Email or Username
Password
Remember
Login
Register

I forgot my password
Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Prev
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. For hardcopy of previous year questions please see
here
Answers by Debashish Deka
User Debashish Deka
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
User Debashish Deka
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
+46
votes
1
GATE2007IT83
The head of a hard disk serves requests following the shortest seek time first (SSTF) policy. The head is initially positioned at track number $180$. What is the maximum cardinality of the request set, so that the head changes its direction after servicing every request if the total number of tracks are $2048$ and the head can start from any track? $9$ $10$ $11$ $12$
answered
Dec 18, 2017
in
Operating System

4.6k
views
gate2007it
operatingsystem
diskscheduling
normal
+2
votes
2
Average access time in cache memory along with hard disk
A system has cache main memory and disk for virtual memory. If referenced word in cache $30$ ns to access it. If it is not in cache $80$ ns to load it in cache and reference is started again. If the word not in memory then $22$ms to ... memory and $80$ ns from memory to cache and start again. Cache hit ratio is $0.8$ memory hit ratio is $0.9$
answered
Jul 9, 2017
in
CO & Architecture

531
views
cachememory
multilevelcache
+5
votes
3
precedence graph
please explain the concept of precedence graph in operating system concurrent processes.
answered
Jul 8, 2017
in
Operating System

444
views
self
doubt
+8
votes
4
MIN Resource requirement for deadlock
A system is having 3 user process , each requiring 2 units of resource R . WHAT IS the minimum and maximum no. of units of R required such that no deadlock will occur ?
answered
Jul 8, 2017
in
Operating System

763
views
deadlock
operatingsystem
+5
votes
5
fork system call
Consider the following code snippet: if(fork()&& fork()) { fork(); } if(fork()fork()) { fork(); fork(); } printf("GATE 2017"); How many times GATE $2017$ printed? How to solve this using tree diagram?
answered
Jul 7, 2017
in
Operating System

1.9k
views
operatingsystem
fork
+6
votes
6
programming
#include <stdio.h> int main() { int x=1,y=0,z=5; int a=x && y && z++; printf("%d",z); } The output is 5, can someone explain how?
answered
Jul 7, 2017
in
Programming

208
views
programminginc
+6
votes
7
working of fork() system call
How many times "hello" gets printed? main() { fork(); fork(); printf("hello"); }
answered
Jul 7, 2017
in
Operating System

793
views
fork
operatingsystem
+4
votes
8
Multidimensional array
int b[10][10]; int *a[10]; //How b[2][3] and a[2][3] will work??
answered
Jul 3, 2017
in
Programming

356
views
+1
vote
9
C programming
How can we print this alphabetical pattern using c? ABCDE BCDE CDE DE ABCD BCD CD D ABC BC C AB B A
answered
Jun 28, 2017
in
Programming

100
views
0
votes
10
Recursive function
int fun(int n) { int s=0,i; if(n<=1) return 1; for(i=1; i*i<n; i++) s+=n; return fun(n/4)+fun(n/4)+s; } what will be the time complexity, returning value and no. of recursive calls of the abovegiven code?
answered
Jun 28, 2017
in
Algorithms

220
views
algorithms
+1
vote
11
let us c
#include<stdio.h> int main() { int i = 0x1 << sizeof(int)*81; printf("\n%x",i); i = i >> sizeof(int)*81; printf("%d",i); } Find the output ?
answered
Jun 26, 2017
in
Programming

175
views
programminginc
+2
votes
12
SSelf
The value returned by the following function for foo(10) is ____ int foo(int x) { if(x < 1) return 1; int sum = 0; for(i = 1; i <= x; i++) { sum += foo(xi); } return sum; }
answered
Jun 26, 2017
in
Programming

85
views
programminginc
programming
+3
votes
13
LEARNING LINUX Beginner's Guide to linux
Hey friends lets learn linux get small exercise and get speed over that platform as it is simlar to other operating system but to get an industrial touch just be familar and get daily small excersie and guidance by Arjun sir .. . .. follow ... n discuss here your queries ... Also make your laptop dual boot and install a linux if you already have not.
answered
Jun 25, 2017
in
Others

1.6k
views
linux
gettingtoiits
+14
votes
14
GATE200784
Suppose that a robot is placed on the Cartesian plane. At each step it is allowed to move either one unit up or one unit right, i.e., if it is at $(i,j)$ then it can move to either $(i + 1, j)$ or $(i,j + 1)$. How many distinct paths are there for the robot to reach the point $(10,10)$ starting from the initial position $(0,0)$? $^{20}\mathrm{C}_{10}$ $2^{20}$ $2^{10}$ None of the above
answered
Jun 25, 2017
in
Combinatory

2.9k
views
gate2007
permutationsandcombinations
+2
votes
15
Hasse diagram
How come D66 is boolean algebra. Explain it through hasse diagram.
answered
Jun 25, 2017
in
Set Theory & Algebra

114
views
+2
votes
16
Probability
P( A union B)=.6 P( A intersection B)=.25 Find P(A`) +P(B`) ? where P(A`) means probability of A complement.
answered
Jun 25, 2017
in
Mathematical Logic

74
views
probability
engineeringmathematics
+5
votes
17
3 D array with pointers
answered
Jun 3, 2017
in
Programming

214
views
+7
votes
18
Generating function , closed form
Find a closed form for the generating function for the given sequence 1) 1,1,0,1,1,1,1,1..... 2) 1,2,1,1,1,1,1..... Do manually ..
answered
Jun 3, 2017
in
Combinatory

260
views
generatingfunctions
+3
votes
19
LEARNING LINUX Beginner's Guide to linux
Hey friends lets learn linux get small exercise and get speed over that platform as it is simlar to other operating system but to get an industrial touch just be familar and get daily small excersie and guidance by Arjun sir .. . .. follow ... n discuss here your queries ... Also make your laptop dual boot and install a linux if you already have not.
answered
Jun 1, 2017
in
Others

1.6k
views
linux
gettingtoiits
+3
votes
20
Finding best time complexity
$\begin{align*} & a[n] = \{x_1,x_2,x_3,x_4,....,x_n\} \text{ is an array of integers where } n,x_i > 0. \\ & A = \left [ \text{min}\left ( x_i,x_j \right ) \right ] \cdot \left ( ji \right ) \text{ where } j > i \text{ and } i,j \leq n \\ & \text{What is the best time complexity to find out the value of } A_{\bf max} \; ? \end{align*}$
answered
May 28, 2017
in
Algorithm Challenges

238
views
algorithms
timecomplexity
+2
votes
21
ISBN9780070681880  Exercise 5.3  Problem 35 (Kenneth Rosen 7ed SIE)
How many bit strings contain exactly eight 0s and 10 1s if every 0 must be immediately followed by a 1 ?
answered
May 27, 2017
in
Mathematical Logic

160
views
kennethrosen
discretemathematics
permutationsandcombinations
counting
+3
votes
22
#PROG
Predict the output of following program. Assume that the numbers are stored in 2's complement form. #include<stdio.h> int main() { unsigned int x = 1; int y = ~0; if (x == y) printf("same"); else printf("not same"); return 0; } 1.SAME 2.NOT SAME
answered
May 17, 2017
in
Programming

93
views
programminginc
+21
votes
23
GATE20006
Let $S$ be a set of $n$ elements $\left\{1, 2,....., n\right\}$ and $G$ a graph with 2$^{n}$ vertices, each vertex corresponding to a distinct subset of $S$. Two vertices are adjacent iff the symmetric difference of the corresponding sets has exactly $2$ ... $G$ has the same degree. What is the degree of a vertex in $G$? How many connected components does $G$ have?
answered
May 12, 2017
in
Set Theory & Algebra

1.4k
views
gate2000
settheory&algebra
normal
descriptive
sets
+1
vote
24
ISI 2016 PCB C5
What will be the output of the following C program? If you think it will give a runtime error, you need to mention it. In either case, your answer must include proper justifications without which no credit will be given. #include<stdio.h> main() { unsigned char i, j, a[] = {1, 2, 3, 4, 5} ... j, n); while(j != 0) a[0] += n; printf("j = %d, a[0] = %d\n", j, a[0]); }
answered
May 9, 2017
in
Others

159
views
programminginc
output
0
votes
25
MIT assignment Doubt
How the worst case of merge sort is O(n^2) according to the given MIT assignment pdf: explain ?
answered
May 9, 2017
in
Algorithms

160
views
algorithms
timecomplexity
+10
votes
26
ISRO201763
What does the following program do when the input is unsigned 16 bit integer? #include<stdio.h> main(){ unsigned int num; int i; scanf("%u", &num); for(i=0;i<16;i++){ printf("%d", (num<<i&1<<15)?1:0); } } It prints all even bits from num It prints all odd bits from num It prints binary equivalent of num None of above
answered
May 7, 2017
in
Programming

3k
views
isro2017
programminginc
+15
votes
27
ISRO201780
The time complexity of computing the transitive closure of a binary relation on a set of $n$ elements is known to be a. $O(n\log n)$ b. $O\left( n^{3/2}\right)$ c. $O( n^3 )$ d. $O(n)$
answered
May 7, 2017
in
Algorithms

2.8k
views
isro2017
relations
algorithms
timecomplexity
0
votes
28
Placing rooks in nXn chess board
Write a recursive backtracking solution for placing $3$ rooks in $6^*6$ chess board. Naive backtracking. Try using bitmask to speed it up.
answered
May 6, 2017
in
Algorithms

200
views
nongate
recursion
game
permutationsandcombinations
0
votes
29
linked list
I think option should be a) but given is c.here head pointer point the first node whereas tail pointer point the last node And if want to delete the first element then element will be deleted but head pointer will be free.then how to head pointer point the first node/element.Pls tell what is correct??
answered
May 1, 2017
in
DS

130
views
+1
vote
30
PGEE 2017
$\int_{3}^{3} \left  X+1 \right dx$
answered
Apr 30, 2017
in
Calculus

167
views
iiithpgee
calculus
+3
votes
31
ISI 2014
Read the C code given below. What would be the output of the following program? Justify your answer. #include <stdio.h> int myrecurse(int a, int b){ return (b == 1 ? a: myrecurse(a, b1) + a); } main() { int a[]= {2,3,4,5,6}; ... an $O(n log n)$ algorithm to determine whether the given sequence $S$ has a subsequence whose sum is zero, and justify the correctness of the algorithm.
answered
Apr 26, 2017
in
Written Exam

152
views
isi2014
programminginc
algorithms
+4
votes
32
what is difference between "int * const ptr=&i" and const int *ptr;;
what is difference between "int * const ptr=&i" and const int *ptr;;
answered
Apr 21, 2017
in
Programming

353
views
programminginc
+1
vote
33
Generate atleast 3 solutions for 5 x 5 queen problem
Genearate atleast 3 solutions for 5 x 5 queen problem
answered
Apr 20, 2017
in
Algorithms

564
views
queenproblem
backtracking
algorithms
+5
votes
34
theory of computation
How many of them below are equivalent to (a+b)* ? A) (a*b)*a* B) (b*a)*b* C) a*(ba*)* D) b*(ab*)*
answered
Apr 15, 2017
in
Theory of Computation

133
views
theoryofcomputation
regularexpressions
+3
votes
35
Timothy Williams Question
The machine pictured in fig a)complements a given bit pattern b)finds 2's complement c)increments a given bit pattern by 1 d)changes the sign bit
answered
Apr 15, 2017
in
Theory of Computation

187
views
+1
vote
36
c pointers
main() { char *p1="name"; char *p2; p2=(char*)malloc(20); memset(p2,0,20); while(*p2++=*p1++); printf("%s\n",p2); }
answered
Apr 14, 2017
in
Programming

192
views
+1
vote
37
Rosen chapter6 (counting)
How many solutions are there to the equation x1 + x2 + x3 + x4 + x5 = 21, where xi , i = 1, 2, 3, 4, 5, is a nonnegative integer such that: 0$\leq$ x1$\leq$10 ?
answered
Apr 14, 2017
in
Combinatory

820
views
discretemathematics
kennethrosen
+2
votes
38
Probability Exercise
The chess club of two school consists of 8 and 9 players.4 member from each club are randomly chosen to participate in a competition of two school.chosen player from one team are then randomly paired against chosen players of another team.suppose Rebecca and ... and Elise will be paired 2.Rebecca and Elise will be chosen to play but they will NOT be paired against Each Other
answered
Apr 11, 2017
in
Probability

259
views
probability
Page:
1
2
3
4
5
6
...
10
next »
47,197
questions
51,428
answers
178,318
comments
66,728
users