Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage
Programming in C.
Recursion.
Filter
Recent
Hot!
Most votes
Most answers
Most views
Previous GATE
Featured
Most answered questions in Programming and DS
1
votes
1
answer
4111
AVL tree
Explain it plz
Explain it plz
tiger
497
views
tiger
asked
Dec 15, 2015
0
votes
1
answer
4112
Program
Explain it
Explain it
tiger
241
views
tiger
asked
Dec 15, 2015
0
votes
1
answer
4113
BST
Explain It
Explain It
tiger
273
views
tiger
asked
Dec 15, 2015
0
votes
1
answer
4114
Find the error in program
the given ans is (d) but it will run forever as ch is character type and can have max value 255 and then it will be reset. also char would be implicitly typecasted to int so comparison is valid. why would it give compilation error
the given ans is (d) but it will run forever as ch is character type and can have max value 255 and then it will be reset. also char would be implicitly typecasted to int...
Abhishekcs10
527
views
Abhishekcs10
asked
Dec 14, 2015
2
votes
1
answer
4115
C program
why this function not do swapping #include <stdio.h> void swap(char *str1, char *str2) { char *temp = str1; str1 = str2; str2 = temp; } int main() { char *str1 = "Gate"; char *str2 = "Overflow"; swap(str1, str2); printf("str1 is %s, str2 is %s", str1, str2); return 0; } Output : str1 is Gate, str2 is Overflow
why this function not do swapping#include <stdio.h void swap(char *str1, char *str2) { char *temp = str1; str1 = str2; str2 = temp; } int main() { char *str1 = "Gate"; ch...
tiger
609
views
tiger
asked
Dec 14, 2015
Programming in C
programming-in-c
pointers
+
–
2
votes
1
answer
4116
programming
int x=0,i; for(i=0;i<10;i++) if(i%2&&x++) x=+2; what is the value of x.
int x=0,i;for(i=0;i<10;i++)if(i%2&&x++)x=+2;what is the value of x.
Chandra Bhushan Kuma
1.6k
views
Chandra Bhushan Kuma
asked
Dec 12, 2015
2
votes
1
answer
4117
what is the range of index values for a leaf node in a heap data structure which is represented as a binary tree?
If I have n elements in the heap then why does the index of leaf nodes ranges from index ⌊n/2⌋+1 to index n ?
radha gogia
1.6k
views
radha gogia
asked
Dec 10, 2015
0
votes
1
answer
4118
what will be the recurance relation of the following program??
Jay Singh
399
views
Jay Singh
asked
Dec 8, 2015
1
votes
1
answer
4119
time complexity
Jay Singh
672
views
Jay Singh
asked
Dec 7, 2015
1
votes
1
answer
4120
Meaning of declaration.
sabir
234
views
sabir
asked
Dec 6, 2015
1
votes
1
answer
4121
BST
certain file system stores records as per binary search tree principles.If the preorder traversal is 90,40,30,190,140,100,290.What is the expected number of comparisons when we randomly request one of the records?
certain file system stores records as per binary search tree principles.If the preorder traversal is 90,40,30,190,140,100,290.What is the expected number of comparisons w...
shreshtha5
559
views
shreshtha5
asked
Nov 30, 2015
DS
binary-search-tree
numerical-answers
+
–
2
votes
1
answer
4122
c program
how statement "printf("%s ", cpp[-1][-1]+1);" works plz explain #include <stdio.h> char *c[] = {"GatsQuiz", "MCQ", "TEST", "QUIZ"}; char **cp[] = {c+3, c+2, c+1, c}; char ***cpp = cp; int main() { printf( ... 3); printf("%s ", *cpp[-2]+3); printf("%s ", cpp[-1][-1]+1); return 0; } o/p TEST sQuiz Z CQ
how statement "printf("%s ", cpp[-1][-1]+1);" works plz explain#include <stdio.h char *c[] = {"GatsQuiz", "MCQ", "TEST", "QUIZ"}; char cp[] = {c+3, c+2, c+1, c}; char ...
tiger
766
views
tiger
asked
Nov 28, 2015
Programming in C
programming-in-c
+
–
1
votes
1
answer
4123
c program
what function fun() does here #include <string.h> #include <stdio.h> #include <stdlib.h> void fun(char** str_ref) { str_ref++; } int main() { char *str = (void *)malloc(100*sizeof(char)); strcpy(str, "gate2016"); fun(&str); puts(str); free(str); return 0; } op gate2016
what function fun() does here#include <string.h>#include <stdio.h>#include <stdlib.h>void fun(char str_ref){str_ref++;}int main(){char *str = (void *)malloc(100*sizeof(c...
tiger
347
views
tiger
asked
Nov 28, 2015
2
votes
1
answer
4124
C program
Explain the array representation used here #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; } op=2 3 5 6
Explain the array representation used here#include <stdio.h>int main(){int a[][3] = {1, 2, 3, 4, 5, 6};int (*ptr)[3] = a;printf("%d %d ", (*ptr) , (*ptr) );++ptr;printf("...
tiger
413
views
tiger
asked
Nov 28, 2015
1
votes
1
answer
4125
pointer array
What it means ? int (*p)[R][C];
What it means ?int (*p)[R][C];
tiger
510
views
tiger
asked
Nov 27, 2015
2
votes
1
answer
4126
Time complexity
What is time complexity to evaluate prefix and postfix expression ? as per me it should be O(n) as atmost 2 pop operation perform and 1 push operation
What is time complexity to evaluate prefix and postfix expression ? as per me it should be O(n) as atmost 2 pop operation perform and 1 push operation
saurav04
1.6k
views
saurav04
asked
Nov 25, 2015
1
votes
1
answer
4127
C programming
what does the following c expression do? x = x & (x-1)
what does the following c expression do?x = x & (x-1)
tiger
2.1k
views
tiger
asked
Nov 25, 2015
4
votes
1
answer
4128
NUMBER OF HEAPS POSSIBLE
# heaps Min or Max_ consider any! Give recurrence relation / math expression For What is the number of min heaps possible with $n$ distinct elements? What is the number of min heaps possible with $n$ elements on which $k$ elements are repeated $t$ times where $t=0$ to infinite (rather considering infinite consider some max value (countable))?
# heapsMin or Max_ consider any!Give recurrence relation / math expression ForWhat is the number of min heaps possible with $n$ distinct elements?What is the number of mi...
Ravi Raaja
3.0k
views
Ravi Raaja
asked
Nov 24, 2015
DS
combinatory
binary-heap
+
–
0
votes
1
answer
4129
form a tree if possible
pre order :13245786 in order : 12345678
pre order :13245786in order : 12345678
Pranay Datta 1
502
views
Pranay Datta 1
asked
Nov 18, 2015
0
votes
1
answer
4130
DFA design with java
How can i solve a DFA which is divisible by 3 with the states ( like - state q0 ,return q1 ) in java programming language.
How can i solve a DFA which is divisible by 3 with the states ( like - state q0 ,return q1 ) in java programming language.
Obonti
529
views
Obonti
asked
Nov 18, 2015
Page:
« prev
1
...
201
202
203
204
205
206
207
208
209
210
211
...
309
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register