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
1
answer
2521
Ace Programming and DS
Sambhrant Maurya
218
views
Sambhrant Maurya
asked
Jul 25, 2018
0
votes
1
answer
2522
binary search tree
Consider an empty binary search tree of height -1. We need to feel the following sequence of numbers in it: 11, 12, 13, 14, 15, 16, 17. The number of ways in which the numbers can be inserted in an empty binary search tree, such that the resulting tree has height 6, is _____________
Consider an empty binary search tree of height -1. We need to feel the following sequence of numbers in it: 11, 12, 13, 14, 15, 16, 17. The number of ways in which the nu...
poojasharma123
780
views
poojasharma123
asked
Jul 13, 2018
0
votes
2
answers
2523
Made Easy programming and DS
Sambhrant Maurya
328
views
Sambhrant Maurya
asked
Jul 15, 2018
0
votes
2
answers
2524
Made Easy programming and DS
int f(int n) { static int r=0; if(n<=0) return 1 ; if (n>3) { r=n; return f(n-2) +2; } return f(n-1)+r; } What is the value of f(5)? Kindly explain how the recursion is working here along with the solution.
int f(int n){static int r=0;if(n<=0)return 1 ;if (n>3){r=n;return f(n-2) +2;}return f(n-1)+r;}What is the value of f(5)? Kindly explain how the recursion is working here ...
Sambhrant Maurya
478
views
Sambhrant Maurya
asked
Jul 9, 2018
0
votes
1
answer
2525
#Self Doubt #programming-in-c What will be time complexity of the program?
What will be time complexity of the program? Explain?? #include<stdio.h> int main(){ int i,count=0; for(i=1 ; i<=n ; i++) { for(i=1 ; i<=$n^4$ ; i++) for(i=1 ; i<=$n^3$ ; i++){ count++; printf("%d\n",count); } } }
What will be time complexity of the program? Explain??#include<stdio.h>int main(){ int i,count=0; for(i=1 ; i<=n ; i++) { for(i=1 ; i<=$n^4$ ; i++) ...
sumitr
442
views
sumitr
asked
Jul 10, 2018
Programming in C
programming-in-c
time-complexity
+
–
0
votes
2
answers
2526
Made Easy Programming and DS
A(n) { if(n<1) return 1; else return A(n-2) + B (n-1); } B(n) { if(n<=1) return 1; else return B(n-1) + A(n-2); } What is the output for A(6)? Please show how the recursion is working here along with the solution.
A(n){if(n<1)return 1;elsereturn A(n-2) + B (n-1);}B(n){if(n<=1)return 1;elsereturn B(n-1) + A(n-2);}What is the output for A(6)?Please show how the recursion is working h...
Sambhrant Maurya
354
views
Sambhrant Maurya
asked
Jul 13, 2018
0
votes
0
answers
2527
doubt-tree
If each node of the B-tree is 80 percent full, then what is the average number of keys per node of the above B tree?
If each node of the B-tree is 80 percent full, then what is the average number of keys per node of the above B tree?
bhavnakumrawat5
360
views
bhavnakumrawat5
asked
Jul 20, 2018
DS
binary-tree
+
–
0
votes
0
answers
2528
Testbook test series
How to identify that operator is binary or unary c =-i--j
How to identify that operator is binary or unaryc =-i j
jatin khachane 1
120
views
jatin khachane 1
asked
Aug 4, 2018
0
votes
2
answers
2529
Made Easy Programming and DS
Consider the following nested recursive function: A(m,n)= n+1 if m=0, A(m-1,1) if n=0, A(m-1,A(m,n-1)) otherwise. What is the output of A(2,3)?
Consider the following nested recursive function: A(m,n)= n+1 if m=0, A(m-1,1) if n=0, A(m-1,A(m,n-1)) otherwise.What is the output of A(2,3)?
Sambhrant Maurya
380
views
Sambhrant Maurya
asked
Jul 12, 2018
2
votes
2
answers
2530
how >> and << works
#include <stdio.h> int main(void) { int a=5, b=10; printf("%d%d",a,b); make_it(b,a,a+b); printf("%d%d",a,b); return 0; } int make_it(int x,int y, int z){ x*=y+z; y=x<<1; z=x+y; }
#include <stdio.h int main(void) { int a=5, b=10; printf("%d%d",a,b); make_it(b,a,a+b); printf("%d%d",a,b); return 0; } int make_it(int x,int y, int z){ x*=y+z; y=x<<1; z...
piya
871
views
piya
asked
Jun 13, 2018
Programming in C
programming-in-c
+
–
1
votes
1
answer
2531
data structure
main () { int N, x; scanf (“%d”, & N); x = 0; while (N > 0) { x = x + 1 – N % 2; n/= 2; } print f(“%d,” x); } What is the sum of smallest two values of N for which value printed is 5?
main (){int N, x;scanf (“%d”, & N);x = 0;while (N 0){x = x + 1 – N % 2;n/= 2;}print f(“%d,” x);}What is the sum of smallest two values of N for which value pri...
poojasharma123
401
views
poojasharma123
asked
Jul 13, 2018
0
votes
0
answers
2532
programming and data structure
que--Study the following program written in a block structured language. var p, q : integer; begin p:= p+q; q:= p−q; p:= p−q; end; (a) exchanges (p) and (q) (b) doubles (p) and stored in (q) (c) doubles (q) and stores in (p) (d) leaves (p) and (q) unchanged
que Study the following program written in a block structured language.var p, q : integer;begin p:= p+q; q:= p−q; p:= p−q;end;(a) exc...
air1ankit
588
views
air1ankit
asked
Jul 12, 2018
Programming in C
programming-in-c
data-structures
algorithms
+
–
1
votes
1
answer
2533
Static Variable C Program
Q1) #include<stdio.h> static int i; static int i = 27; static int i; int main() { static int i; printf("%d",i); return 0; } A) 27 B) 0 C) No Output D)None of the these Q2) #include<stdio.h> static int i; static int i = 27 ... 0; } A) 27 B) 0 C) No Output D)None of the these @Arjun Sir please explain deeply, How to store the static variable in memory?
Q1)#include<stdio.h static int i; static int i = 27; static int i; int main() { static int i; printf("%d",i); return 0; }A) 27 B) 0 C) No Output D)None ...
Lakshman Bhaiya
1.4k
views
Lakshman Bhaiya
asked
Apr 21, 2018
Programming in C
programming-in-c
+
–
0
votes
1
answer
2534
c programming
void main { char *p; p="hello"; printf("%c\n",*&*p); }
void main{char *p;p="hello";printf("%c\n",*&*p);}
amit166
461
views
amit166
asked
Jul 12, 2018
0
votes
1
answer
2535
Yashavant kanetkar understanding pointer in C, Chepter 1, Question 6.
6. Would the following program compile? main( ) { int a = 10, *j; void *k; j = k = &a; j++ ; k++; printf ("\n %u %u", j, k ) ; } Please explain above program with some examples..
6. Would the following program compile?main( ) { int a = 10, *j; void *k; j = k = &a; j++ ; k++; printf ("\n %u %u", j, k ) ; }Please explain above program with some exam...
ermp888
669
views
ermp888
asked
Jun 30, 2018
Programming in C
programming-in-c
+
–
1
votes
2
answers
2536
Ace Test Series: Data Structures - Binary Trees
Shankar Kakde
893
views
Shankar Kakde
asked
Jun 6, 2018
DS
ace-test-series
data-structures
binary-tree
+
–
0
votes
0
answers
2537
c programming
What is the output of the following program? #include<stdio.h> main() { int i = 258; int *iptr = &i; printf("%d %d",*((char*)iptr),*((char*)iptr + 1)); } explain briefly.
What is the output of the following program?#include<stdio.h main(){ int i = 258; int *iptr = &i; printf("%d %d",*((char*)iptr),*((char*)iptr + 1));}explain brie...
Siddharth Bhardawaj
410
views
Siddharth Bhardawaj
asked
Jul 21, 2018
1
votes
3
answers
2538
UGC NET CSE | January 2017 | Part 2 | Question: 22
The seven elements $A, B, C, D, E,F$ and $G$ are pushed onto a stack in reverse order, i.e., starting from $G$. The stack is popped five times and each element is inserted into a queue. Two elements are deleted from the queue and pushed back onto the stack. Now, one element is popped from the stack. The popped item is ___________. $A$ $B$ $F$ $G$
The seven elements $A, B, C, D, E,F$ and $G$ are pushed onto a stack in reverse order, i.e., starting from $G$. The stack is popped five times and each element is inserte...
go_editor
7.4k
views
go_editor
asked
Mar 24, 2020
DS
ugcnetjan2017ii
data-structures
stack
+
–
0
votes
1
answer
2539
C programming
what is the output of the program? void main() { static char x=1; if(!x) exit(1); main(x=!printf(“\n IS IT GOOD?\n”),printf(“%d”,x=(EOF|EOF&EOF))); } (A) –1 IS IT GOOD (B) 1 IS IT GOOD (C) 0 IS IT GOOD
what is the output of the program? void main() { static char x=1; if(!x) exit(1); ...
Ankish Gupta 3
280
views
Ankish Gupta 3
asked
Jul 18, 2018
Programming in C
programming-in-c
programming
output
+
–
1
votes
0
answers
2540
Made Easy Programming and DS
Sambhrant Maurya
135
views
Sambhrant Maurya
asked
Jul 25, 2018
Page:
« prev
1
...
122
123
124
125
126
127
128
129
130
131
132
...
310
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register