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.
Questions 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
0
votes
1
answer
1
C programming
int main() { int n = 3,i,count=0; for(i=0;i<1<<n;i++) { int p = i; while(p) { int k = p & p; p = p  k; count++; } } } The value of count variable after execution of the above code? The value of count variable when $n = m$ ? [EDITED]
asked
5 days
ago
in
Programming

52
views
programminginc
#bitwise
+2
votes
4
answers
2
C programming  Output ?
#include <stdio.h> int main() { unsigned char a = 5; a = (1<<((sizeof(char)<<3)1)); char b = a; printf("%d %d\n",b,a); printf("%u %u\n",b,a); } If the size of a char datatype is 1 Byte, then what will be the output? [Edited]
asked
Apr 10
in
Programming

148
views
programminginc
0
votes
2
answers
3
No of spanning Trees
Let $K_n$ denote the complete undirected graph with $n$ vertices where n is an even number. Find the maximum number of spanning trees of $K_n$ that can be formed in such a way that no two of these spanning trees have a common edge.
asked
Mar 19
in
Graph Theory

93
views
spanningtree
graphtheory
0
votes
0
answers
4
Recurrence relation and generating function
asked
Mar 19
in
Combinatory

51
views
generatingfunctions
combinatorics
recurrenceeqation
+1
vote
2
answers
5
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 ___ ?
asked
Mar 19
in
Programming

101
views
programminginc
0
votes
0
answers
6
Kenneth Rosen 6.444 advanced counting
asked
Mar 15
in
Combinatory

44
views
discretemathematics
generatingfunctions
recurrenceequation
0
votes
1
answer
7
Generating function
Let $h_n$ denote the number of nonnegative integral solutions of the equation $3x_1 + 4x_2 + 2x_3 + 5x_4 = n$ Find the generating function $g(x)$ for $h_0,h_1,h_2,h_3 ... h_n$
asked
Mar 15
in
Combinatory

46
views
generatingfunctions
combinatorics
+1
vote
1
answer
8
False sharing in cache Line
Here is pseudo code for a multiprocessing purpose: set_num_threads(NUM_THREADS); double sum=0.0; sum_local[NUM_THREADS]; parallel region { int this_thread_id = get_thread_number(); // returns 0 to (no_of_threads1) sum_local[this_thread_id] ... DRAM write back causing the problem, but not very clear, though. please explain a bit. @Arjun Sir
asked
Mar 6
in
CO & Architecture

64
views
co&architecture
cachememory
nongate
descriptive
0
votes
2
answers
9
Discrete math
The following is a sequence of formula, $$\begin{align*} \begin{matrix} & 9*1+2 &= &11 \\ & 9*12+3 &= &111 \\ & 9*123+4 &= &1111 \\ & 9*1234+5 &= &11111 \\ \end{matrix} \\ ... align*}$$ Here numbers are in base $10$. (a) Establish a formula in $\sum$ notation. (b) Generalize that formula in for any base $b$..
asked
Feb 26
in
Set Theory & Algebra

59
views
discretemathematics
descriptive
nongate
+1
vote
3
answers
10
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*}$$
asked
Feb 25
in
Combinatory

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

73
views
discretemathematics
descriptive
nongate
0
votes
0
answers
12
Discrete math
Let $w \in \sum$$*$ be a string, with $\sum$ being the alphabet. Let $w^R$ be the reversal of string $w$, using induction prove that $(w^R)(w^R). . .(\text{for k times}) = (ww . . .(\text{for k times}))^R.$
asked
Feb 22
in
Set Theory & Algebra

46
views
descriptive
iitg_math
discretemathematics
0
votes
2
answers
13
Discrete Math
Prove or disprove the following: for finite sets A and B, $\overline{(A  B) \cup (B  A)} = A \cap B$ . If the proposition is incorrect, do minimal modifications to the same and prove.
asked
Feb 22
in
Set Theory & Algebra

71
views
discretemathematics
iitg_math
nongate
descriptive
0
votes
1
answer
14
Discrete math
Prove the following: $3 \;  \;\left ( a^2+b^2 \right )$ if and only if $3 \;  \;a$ and $3 \;  \;b$.
asked
Feb 22
in
Set Theory & Algebra

82
views
discretemathematics
iitg_math
descriptive
nongate
+1
vote
2
answers
15
Stable sorting algorithms
Show that any comparison based sorting algorithm can be made stable without increasing its complexity beyond a constant factor.
asked
Feb 21
in
Algorithms

102
views
algorithms
descriptive
timecomplexity
nongate
+2
votes
1
answer
16
C programming
int a[20]; unsigned int m; // global variable int foo(int a[]) { int i=0,count = 0; while(i < 20) m = 1<<(a[i++]1); i = (sizeof(int)<<3)1; while(i>=0) if(m&(1<<(i))) count++; return ... in a[] which are more than $20$ B No of distinct elements in a[] which less than $20$ C No of distinct elements in a[] D None of these
asked
Feb 18
in
Programming

128
views
programminginc
cprogramming
output
+2
votes
1
answer
17
Probability
Three $N$ bit binary strings $S_1$,$S_2$,$S_3$ are selected in random. What is the probability that result of bitwise XOR among them contains $k$ $1$'s.i.e. $S_1\oplus S_2\oplus S_3$ = $S$ , No of set bits in $S$ = $k$ is it $\binom{n}{k}\left ( \frac{1}{2} \right )^k\left ( \frac{1}{2} \right )^{nk}$ ??
asked
Feb 8
in
Probability

100
views
probability
+3
votes
1
answer
18
Balanced tree Minimum no of nodes for height h
asked
Feb 8
in
Algorithms

136
views
algorithms
+1
vote
1
answer
19
dfa gatebook QS
asked
Feb 7
in
Theory of Computation

62
views
theoryofcomputation
dfa
+1
vote
1
answer
20
Asynchronous counter circuit with feedback input GATEBOOK QS
asked
Feb 7
in
Digital Logic

139
views
counter
digitallogic
#digitalcounter
+1
vote
2
answers
21
C programming
char *x[5] = {"abc","def","ghi","jkl","mno"}; char *y[5] = {"123","456","789","101","102"}; struct hcode { char *word; }hcodes[5]; struct key { int id; char *word; ... ; return 0; } $A.$ 456,hi,01,no $B.$ 456,ghi,101,mno $C.$ 56,hi,01,no $D.$ 456,ef,01,no
asked
Feb 3
in
Programming

125
views
programminginc
cprogramming
output
pointers
+3
votes
2
answers
22
Higher normal form decomposition
asked
Feb 1
in
Databases

267
views
databasenormalization
databases
decomposition
ermodel
0
votes
0
answers
23
Encoding manchester and differential manchester
asked
Jan 27
in
Computer Networks

140
views
manchesterencoding
computernetworks
+4
votes
0
answers
24
Evaluation order in return statement
asked
Jan 21
in
Programming

237
views
programminginc
+2
votes
0
answers
25
quick sort
If we use quicksort algorithm to sort the elements: $16, 13, 14, 12, 21, 16, 23$ and $15$ in ascending order, what is the output after the first pass of quicksort? (Assume pivot element is beginning of an array)
asked
Jan 20
in
Algorithms

101
views
algorithms
quicksort
sorting
0
votes
1
answer
26
Tree BFS
int func(Node root) { int x = 0; int y = 0; queue Q; Q.push(root); while(!Q.empty()) { Node u = Q.top(); Q.pop(); if(u>left == NULL && u>right == NULL) x++; if(u>left != NULL) { y++; Q.push(u> ... != NULL) { y++; Q.push(u>right); } } return x+y; } Above code segment is executed on the following rooted tree: What will be the output?
asked
Jan 13
in
Programming

103
views
bfs
programminginc
binarytree
+2
votes
2
answers
27
Tree DFS
int func(Node root) { if(root == NULL) return 0; else if(root>left == NULL && root>right == NULL) return 2; else return(3 + func(root>left) + func(root>right)); } Above code is executed on the following rooted tree. What will be the output?
asked
Jan 13
in
Programming

126
views
dfs
algorithms
datastructure
binarytree
+5
votes
2
answers
28
C programming
int i=0; char *a = "abcde\0efgh"; while(a[++i]) printf("%d",*++a  'a'); the output of the above c code segment?
asked
Jan 10
in
Programming

209
views
programminginc
cprogramming
output
pointers
+5
votes
1
answer
29
Counting possible no of subsets from a set of numbers S
asked
Jan 9
in
Combinatory

166
views
combinatory
permutation
counting
+3
votes
1
answer
30
Operand forwarding in pipeline
A $5$ stage pipelined processor has the following stages: $IF$ : instruction fetch $ID$ : instruction decode $EX$ : execute $MA$ : memory access $WB$ : write back $$\large\color{red}{IF \rightarrow ID\rightarrow EX\rightarrow MA\ ... R_4\;\;R_5 \\ \end{matrix}$ No. of cycles needed to execute these instructions using operand forwarding?
asked
Jan 8
in
CO & Architecture

707
views
pipeline
co&architecture
operandforwarding
Page:
1
2
3
4
5
next »
22,100
questions
28,082
answers
63,368
comments
24,203
users