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.
Answers 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
votes
1
GATE19887iii
Consider the tree given in the below figure, insert 13 and show the new balance factors that would arise if the tree is not rebalanced. Finally, carry out the required rebalancing of the tree and show the new tree with the balance factors on each mode.
answered
Aug 4
in
DS

51
views
gate1988
normal
descriptive
datastructure
+1
vote
2
GATEbook
answered
Jul 9
in
Combinatory

38
views
0
votes
3
Probability of dice
If 4 dice tossed together , what is the probability of sum of these dice will be exactly 20? (want to see some shortcut procedure)
answered
Jul 1
in
Probability

193
views
probability
+1
vote
4
Switch case
Output of the following program? #include <stdio.h> char input[ ] = "SSSWILTECH1\1\11W\1WALLMP1"; main() { int i,c; for( i=2 ; ( c=input[i] ) ! = '\0' ; i++) { switch(c) { case 'a' : putchar( 'i' );continue; case '1' : break; case ... S' ); case 'E' : case 'L' : continue; default : putchar (c); continue; } putchar( ' ' ); } putchar( '\n' ); }
answered
Jun 29
in
Programming

72
views
switch_case
programminginc
0
votes
5
programming
Observe the unlabelled binary tree given below. The number of ways of inserting the values 1 ,2,3,4,5,6 in a Binary Search Tree such that the resultant BST takes the structure of the Binary tree given above ?
answered
Jun 24
in
DS

33
views
+1
vote
6
GATE20171GA1
After Rajendra Chola returned from his voyage to Indonesia, he ________ to visit the temple in Thanjavur. (A) was wishing (B) is wishing (C) wished (D) had wished
answered
Jun 14
in
Verbal Ability

1.6k
views
gate20171
verbalability
tenses
englishgrammar
normal
0
votes
7
Counting
How many ways are there to put six temporary employees into four labeled offices so that there is at least one temporary employee in each of these four offices?
answered
Jun 14
in
Mathematical Logic

53
views
permutationsandcombinations
counting
+1
vote
8
IISc PhD
A bag contains Red Balls and Black Balls. Two balls are drawn without replacement. The probability that both the balls drawn are red is 1/2. What is the minimum number of Red and Black Balls for which this probability is satisfied?
answered
Jun 11
in
Probability

97
views
iisc
probability
0
votes
9
CarlHamacher
A computer system has a main memory consisting 1M 16 bitwords.It also has a 4Kword cache organized in the blocksetassociative manner,with 4 blocks per set and 64 words per block. a)assume that the cache is initially empty. ... improvement factor resulting from the use of the cache.Assume that LRU algorithm is used for block replacement. ans is: 2.15
answered
Jun 9
in
CO & Architecture

138
views
co&architecture
carlhamacher
cachememory
0
votes
10
Cominatroics
There are 12 copies of Mathematics, 7 copies of Engineering, 3 different books on Medicine and 2 different books on Economics. Find the number of ways in which one or more than one book can be selected? A. 3421 B. 3111 C. 3327 D. 3201
answered
May 31
in
Combinatory

49
views
+1
vote
11
Programming Scope of variables
The following program runs perfectly fine without showing compilation error. I am unable to understand why as 'c' is a local variable of 'function_addition'. So, shouldn't it throw an error? #include<stdio.h> int ... ambiguity as to why the first one prints the value of c correctly whereas the second program shows an error.
answered
May 29
in
Programming

89
views
programminginc
scopingrule
variablescope
0
votes
12
GATE20124
Assuming P ≠ NP, which of the following is TRUE? NPcomplete = NP NPcomplete $\cap$ P = $\phi$ NPhard = NP P = NPcomplete
answered
May 8
in
Theory of Computation

801
views
gate2012
theoryofcomputation
npcompleteness
0
votes
13
GATE200872
Consider a machine with a 2way set associative data cache of size 64 Kbytes and block size 16 bytes. The cache is managed using 32 bit virtual addresses and the page size is 4 Kbytes. A program to be run on this machine begins as follows: double ARR[1024][1024]; int ... elements have the same cache index as ARR[0][0]? ARR[0][4] ARR[4][0] ARR[0][5] ARR[5][0]
answered
Apr 27
in
CO & Architecture

861
views
gate2008
co&architecture
cachememory
normal
+1
vote
14
command line argument
What is the output of this C code (run without any command line arguments)? #include <stdio.h> int main(int argc, char *argv[]) { while (*argv != NULL) printf("%s\n", *(argv++)); return 0; } In this ... but when I execute this prog using cmd.... c:\ <prog_name>...output comes <prog_name> so how prog name is dispalying
answered
Apr 20
in
Programming

53
views
+2
votes
15
C PROGRAMMING
Pick the best statement for the below program: #include "stdio.h" int main() { struct { int a[2], b; } arr[] = {[0].a = {1}, [1].a = {2}, [0].b = 1, [1].b = 2}; printf("%d %d %d and",arr[0]. ... error and two elements of arr[] would be defined and initialized. Output would be 1 X 1 and 2 X 2 where X is some garbage random number.
answered
Apr 15
in
Programming

94
views
programminginc
output
+1
vote
16
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
Mar 20
in
Programming

141
views
programminginc
0
votes
17
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
Mar 19
in
Programming

141
views
programminginc
+2
votes
18
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

62
views
0
votes
19
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*}$$
answered
Feb 26
in
Combinatory

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

86
views
discretemathematics
descriptive
nongate
+1
vote
21
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

121
views
algorithms
descriptive
timecomplexity
nongate
+4
votes
22
Gate ECE 2017 Eigen Value
answered
Feb 9
in
Linear Algebra

376
views
matrix
eigenvalue
0
votes
23
Gate ECE 2017 Eigen Value
answered
Feb 9
in
Linear Algebra

376
views
matrix
eigenvalue
+3
votes
24
MADE EASY TEST SERIES
Consider 6 stage pipeline (S1, S2, S3, S4, S5, S6) which allows all the instructions except branch instructions. Processor stops fetching the following instruction after the branch until the target address is available. Target address is available ... are balanced with a 2.3 GHz clock. MIPS rate of the processor is ________ (in 2 decimal places).
answered
Feb 8
in
CO & Architecture

94
views
+3
votes
25
Demand Paging
Suppose: TLB lookup time = 20 ns TLB hit ratio = 80% memory access time = 75 ns swap page time = 500,000 ns 75% of pages are dirty OS uses a 3 level page table What is the effective access time (EAT) if we assume the page fault rate is 15% ?
answered
Jan 25
in
Operating System

381
views
operatingsystem
demandpaging
memorymanagement
multilevelpaging
0
votes
26
Is the decomposition preserving dependencies?
answered
Jan 23
in
Databases

65
views
dependencypreserving
databases
+3
votes
27
find the output
include <stdio.h> int main() { int a[][3] = {1, 2, 3, 4, 5, 6}; int (*ptr)[3] = a; printf("%d %d ", (*ptr)[1], (*ptr)[2]); ++ptr; printf("%d %d\n", (*ptr)[1], (*ptr)[2]); return 0; } (a) 2 3 5 6 (b) 2 3 4 5 (c) 4 5 0 0 (d) none of the above
answered
Jan 12
in
Programming

115
views
programminginc
+1
vote
28
Virtual Gate
Consider the following two statements: S1: Activation records can have permanent lifetime in case of static allocation. S2: Activation records can have nested lifetime in case of stack allocation. Which of the option is correct regarding S1 and S2 respectively (A) True. True (B) True. False (C) False. True (D) False. False
answered
Jan 10
in
Compiler Design

162
views
virtualgate
+1
vote
29
GATE200649
An implementation of a queue Q, using two stacks S1 and S2, is given below: void insert (Q, x) { push (S1, x); } void delete (Q) { if (stackempty(S2)) then if (stackempty(S1)) then { print( Q is empty ); return; } else while (!(stackempty(S1))){ x= ... $2m\leq y\leq 2n $ $ 2m\leq x<2n $ and $2m\leq y\leq n+m $ $ 2m\leq x<2n $ and $2m\leq y\leq 2n $
answered
Jan 9
in
DS

1.8k
views
gate2006
datastructure
queues
stack
normal
+4
votes
30
GATE20001.16
Aliasing in the context of programming languages refers to multiple variables having the same memory location multiple variables having the same value multiple variables having the same identifier multiple uses of the same variable
answered
Jan 1
in
Programming

671
views
gate2000
programming
easy
aliasing
0
votes
31
output of program
Predict the output of following code segment: #include<iostream.h> Void main ( ) { int x { } = {1,2,3,4,5}; int *p,**q,*t; p=x; cout<<*p; t=x+2; q=&t; cout<<*++p <<**q <<**q <<*t;} (a) 1233 (b) 1223 (d) 1234 (d) 2345
answered
Dec 31, 2016
in
Programming

37
views
+1
vote
32
Apti Question
How option A is correct?? A and C both seem correct opitions?
answered
Dec 29, 2016
in
Verbal Ability

116
views
+2
votes
33
made easy
#plz explain ?? i am not get solution
answered
Dec 27, 2016
in
Compiler Design

53
views
madeeasytestseries
+2
votes
34
C programming
int main() { int a, b; /* Some code which initializes "a" here ... */ if (a < 0) { a = a; } b = sqrt (a); } Above code will always work for calculating the square root of any valid integer value on a system . [T/F]
answered
Dec 27, 2016
in
Programming

192
views
programminginc
+6
votes
35
GATE2007IT13
Consider the following statements about the timeout value used in TCP. The timeout value is set to the RTT (Round Trip Time) measured during TCP connection establishment for the entire duration of the connection. Appropriate RTT estimation algorithm is used to set the ... title (i) and (ii) are false, but (iii) is true (i), (ii) and (iii) are false
answered
Dec 26, 2016
in
Computer Networks

1.1k
views
gate2007it
computernetworks
tcp
normal
+1
vote
36
Minimal DFA
$L_1 = \left \{ w \;\;  \;\; d(w) \text{ mod} \; 8 = 0 \right \}$ $L_2 = \left \{ w \;\;  \;\; d(w) \text{ mod} \; 4 = 0 \right \}$ $d(w) = \text{decimal value of binary string w}$ Minimum no of states in both the cases ?
answered
Dec 25, 2016
in
Theory of Computation

158
views
theoryofcomputation
minimalstateautomata
finiteautomata
+1
vote
37
ACE TESTDIGITAL LOGIC
answered
Dec 24, 2016
in
Digital Logic

56
views
+3
votes
38
Doubt
How to read them?? I. int (*a)(); II. int (*a[5])(); III. int *(*a)(); IV. int (*a)() V. int *(*a)[10]
answered
Dec 24, 2016
in
Programming

111
views
pointers
arrayofpointers
+1
vote
39
equivalence relation
answered
Dec 22, 2016
in
Mathematical Logic

61
views
+1
vote
40
CN: CRC
answered
Dec 22, 2016
in
Computer Networks

178
views
computernetworks
crcpolynomial
Page:
1
2
3
4
5
6
...
21
next »
24,796
questions
31,867
answers
73,707
comments
30,011
users