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
Hot questions in Programming and DS
0
votes
2
answers
1861
madeEasy 47
Consider the following C program struct treenode { int data; struct treenode *left; struct treenode *right; } int gate2015(struct treenode *root) { int gate; if(root==NULL) return 0; if(root->data % 2==1) { root->data -=1; gate++; } else root->data + ... ;right)); } If the above code is executed on the following tree, then what is the output ? I m getting $47$ - match it please
Consider the following C programstruct treenode { int data; struct treenode *left; struct treenode *right; } int gate2015(struct treenode *root) { int gate; if(root==NULL...
eyeamgj
2.9k
views
eyeamgj
asked
Jun 18, 2018
Programming in C
programming-in-c
data-structures
+
–
2
votes
5
answers
1862
made easy
What is the output???
What is the output???
himanshu19
1.5k
views
himanshu19
asked
Sep 8, 2018
Programming in C
programming-in-c
+
–
0
votes
2
answers
1863
Data structure
How to find clique in a graph?
How to find clique in a graph?
Kanchan kumari
415
views
Kanchan kumari
asked
Dec 16, 2018
0
votes
0
answers
1864
Programming and DS
#include<stdio.h> int main() { char A[5][7][6]; char *p[5][7][6]; printf(“%d\t”,(unsigned)(A+1)-(unsigned)A); printf(“%d”,(unsigned)(p+1)-(unsigned)p); } OPTIONS: 42 42 1 1 42 336 336 42
#include<stdio.h int main() { char A[5][7][6]; char *p[5][7][6]; printf(“%d\t”,(unsigned)(A+1)-(unsigned)A); printf(“%d”,(unsigned)(p+1)-(unsigned)p); } OPTIONS:4...
utkarshkosta
379
views
utkarshkosta
asked
Dec 22, 2018
Programming in C
data-structures
programming-in-c
output
+
–
0
votes
1
answer
1865
DATA STRUCTURES
Can anyone explain answer is A
Can anyone explain answer is A
nag.swarna
1.1k
views
nag.swarna
asked
Nov 9, 2018
DS
data-structures
strings
+
–
0
votes
2
answers
1866
Choose the correct statement about HEAP
I. A heap is always nearly complete tree. II. Worst case complexity of heapify operation is O( log n) III. Worst case complexity of build heap operation is O( n log n) a. I only b. I and II only c. II and III only d. I, II and III
I. A heap is always nearly complete tree.II. Worst case complexity of heapify operation is O( log n)III. Worst case complexity of build heap operation is O( n log n)a. I ...
sh!va
4.2k
views
sh!va
asked
Feb 7, 2017
DS
data-structures
binary-heap
time-complexity
+
–
0
votes
0
answers
1867
Trees
Time complexity of creating a balanced binary search tree as well as unbalanced search tree from inorder traversal and preorder traversals?
Time complexity of creating a balanced binary search tree as well as unbalanced search tree from inorder traversal and preorder traversals?
Mudita
137
views
Mudita
asked
Dec 31, 2018
Programming in C
data-structures
+
–
0
votes
0
answers
1868
C Programming quiz
Consider the following C-fragment: #include<stdio.h> int(*foo())[3] { int a[3]={1,2,3}; printf("%d",*a); return &a; } int main() { int (*p)[3]; p==foo(); printf("%d",*(*p+2)); return 0; } $A)13$ $B)10$ $C)31$ $D)Compilation$ $error$
Consider the following C-fragment:#include<stdio.h int(*foo())[3] { int a[3]={1,2,3}; printf("%d",*a); return &a; } int main() { int (*p)[3]; p==foo(); prin...
Lakshman Bhaiya
1.6k
views
Lakshman Bhaiya
asked
Oct 25, 2018
Programming in C
programming-in-c
output
+
–
0
votes
1
answer
1869
C programming
int main() { char *p="abc"; char *q="abc123"; while(*p++=*q++) printf("%c %c",*p,*q); } The Output is b bc c 1a 2b 3c Here explain how did 1a 2b 3c will come as at that time p has null value
int main() { char *p="abc"; char *q="abc123"; while(*p++=*q++) printf("%c %c",*p,*q); }The Output is b bc c 1a 2b 3cHere explain how did 1a 2b 3c will come as at that tim...
kd.....
4.8k
views
kd.....
asked
Apr 21, 2018
Programming in C
programming-in-c
programming
output
pointers
+
–
0
votes
0
answers
1870
Programming
#include<stdio.h> int code(int m){ if(m>0){ int i=1; for(;i<3;i++){ code(m-i); code(m-i-1); printf("GATE2019"); } } } int main() { code(4); return 0; } How many times GATE2019 will be printed?
#include<stdio.h int code(int m){ if(m>0){ int i=1; for(;i<3;i++){ code(m-i); code(m-i-1); printf("GATE2019"); } } } int main() { code(4); return 0; }How many times GATE2...
srestha
348
views
srestha
asked
Dec 23, 2018
Programming in C
programming-in-c
programming
+
–
0
votes
0
answers
1871
#Incriment and decriment
#include <stdio.h> int main(void) { int i=1; printf("%d%d%d",i++,i++,i); } how to evaluate this type of questions
#include <stdio.h>int main(void) {int i=1;printf("%d%d%d",i++,i++,i);}how to evaluate this type of questions
Pavan Karthik
295
views
Pavan Karthik
asked
Dec 27, 2018
Programming in C
incriment
and
decriment
+
–
2
votes
2
answers
1872
Test by Bikram | Data Structures | Test 2 | Question: 30
Meena is working in an IT company as HR manager. She has a large list of potential candidates to be recruited which are all sorted by their names. But she found that due to a bug in software 'O' was ... What would be the appropriate algorithm to correct the list of candidate profiles? Quick Sort Heap Sort Insertion Sort Merge Sort
Meena is working in an IT company as HR manager. She has a large list of potential candidates to be recruited which are all sorted by their names. But she found that due ...
Bikram
1.1k
views
Bikram
asked
Nov 26, 2016
Programming in C
tbb-ds-2
+
–
0
votes
0
answers
1873
made easy
What is the output of the following program if dynamic scoping is used? int a,b,c; void func1(){ int a,b; a=6; b=8; func2(); a=a+b+c; print(a); } void func2(){ int b,c; b=4; c=a+b; a+=11; print(c); } void main(){ a=3; b=5; c=7; func1(); } a)7 19 b)10 1 c)10 23 d)10 32
What is the output of the following program if dynamic scoping is used? int a,b,c; void func1(){ int a,b; a=6; b=8; func2(); a=a+b+c; print(a); } void func2(){ int b,c; b...
Piyush mishra
1.3k
views
Piyush mishra
asked
Oct 27, 2018
Programming in C
programming-in-c
+
–
1
votes
0
answers
1874
Programming
Deepalitrapti
310
views
Deepalitrapti
asked
Dec 18, 2018
0
votes
1
answer
1875
C programming
#include<stdio.h> void fun(int *p,int *q) { p=q; *p=q; } int i=0,j=1; int main() { fun(&i,&j); printf("%d%d",i,j); } What will be the output of i and j in 16-bit C Compiler?
#include<stdio.h void fun(int *p,int *q) { p=q; *p=q; } int i=0,j=1; int main() { fun(&i,&j); printf("%d%d",i,j); }What will be the output of i and j in 16-bit C Compiler...
Mr khan 3
1.0k
views
Mr khan 3
asked
Nov 3, 2018
Programming in C
programming-in-c
output
programming
pointers
+
–
0
votes
1
answer
1876
Gateforum Test Series: Programming & DS - Programming In C
Shivam Kasat
823
views
Shivam Kasat
asked
Nov 17, 2018
Programming in C
gateforum-test-series
programming-in-c
programming
+
–
0
votes
0
answers
1877
Min heap
The number of possible min-heaps containing each value from 1,2, 3, 4, 5, 6, 7 exactly once is.
The number of possible min-heaps containing each value from 1,2, 3, 4, 5, 6, 7 exactly once is.
Kanchan kumari
353
views
Kanchan kumari
asked
Dec 16, 2018
0
votes
0
answers
1878
Output of column major order ques ?
I am getting 55-54 =1 as output but answer mentioned is 10 .
I am getting 55-54 =1 as output but answer mentioned is 10 .
radha gogia
603
views
radha gogia
asked
Nov 26, 2018
Programming in C
programming-in-c
+
–
0
votes
0
answers
1879
What should be the answer?
int main() { int i, j = 1; for(i = 1; i < 100) { j = j * i; i++; if(i == j) break; } } Which of the following is always correct at the end of the loop. s1: (i = 100) or (i > j) s2: if i = n; then j = (n-1)!; n be some random value s3: (i = 100) or (i == j)
int main() { int i, j = 1; for(i = 1; i < 100) { j = j * i; i++; if(i == j) break; } }Which of the following is always correct at the end of the loop.s1: (i = 100) or (i ...
`JEET
350
views
`JEET
asked
Dec 17, 2018
0
votes
0
answers
1880
ME T1
Total number of nodes in tree number of leaves The number of edges in the longest path from root to leaf in T The number of nodes in the longest path from root to leaf in T
Total number of nodes in treenumber of leavesThe number of edges in the longest path from root to leaf in TThe number of nodes in the longest path from root to leaf in T
himgta
381
views
himgta
asked
Dec 17, 2018
Page:
« prev
1
...
89
90
91
92
93
94
95
96
97
98
99
...
310
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register