Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged recursion
4
votes
2
answers
1
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 21
Consider the following two blocks of code, found in separate files: /* main.c */ int main() { int i=0; foo(); return 0; } /* foo.c */ int i=1; void foo() { printf( %d , i); } What will happen when you attempt to ... ? It will fail to compile. It will fail to link. It will print " $0$ ". It will print " $1$ ".
Consider the following two blocks of code, found in separate files:/* main.c */ int main() { int i=0; foo(); return 0; }/* foo.c */ int i=1; void foo() { printf(“%d”,...
GO Classes
948
views
GO Classes
asked
Jan 13
Programming in C
goclasses2024-mockgate-11
goclasses
programming
programming-in-c
recursion
1-mark
+
–
6
votes
1
answer
2
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 48
Consider the following pair of mutually recursive functions. What does $g(g(2))$ evaluate to? int f(int n){ if (n==0) return 0; return f(n-1)+g(n-1); } int g(int n){ if (n==0) return 1; return g(n-1) + f(n); }
Consider the following pair of mutually recursive functions. What does $g(g(2))$ evaluate to?int f(int n){ if (n==0) return 0; return f(n-1)+g(n-1); } int g(int n){ if (n...
GO Classes
414
views
GO Classes
asked
Jan 13
Programming in C
goclasses2024-mockgate-11
goclasses
numerical-answers
programming
programming-in-c
recursion
2-marks
+
–
0
votes
0
answers
3
testbook
Rohit Chakraborty
124
views
Rohit Chakraborty
asked
Dec 24, 2023
Programming in C
testbook-test-series
programming-in-c
recursion
+
–
3
votes
3
answers
4
C Programming Recursion
#include<stdio.h> void print(int n) { printf("Hello "); if(n++ == 0) return ; print(n); n++; } int main() { void print(); print(-4); } How many times printf execute?? And How ??
#include<stdio.h void print(int n) { printf("Hello "); if(n++ == 0) return ; print(n); n++; } int main() { void print(); print(-4); }How many times printf execute?? And H...
Laxman Ghanchi
1.1k
views
Laxman Ghanchi
asked
May 19, 2023
Programming in C
programming-in-c
programming
recursion
+
–
0
votes
1
answer
5
C Programming Recursion
#include<stdio.h> void print(int n){ printf("Hello "); if(n++ == 0) return ; print(n); n++; } int main(){ void print(); print(-4); }
#include<stdio.h>void print(int n){ printf("Hello "); if(n++ == 0) return ; print(n); n++;}int main(){ void print(); print(-4);}
Laxman Ghanchi
664
views
Laxman Ghanchi
asked
May 19, 2023
Programming in C
programming-in-c
programming
recursion
+
–
0
votes
1
answer
6
Ace Test series |C programming | What will be the output of the following program ?
What will be the output of the following program ? answer is 8 but I am getting 5, please explain where I am wrong
What will be the output of the following program ?answer is 8 but I am getting 5, please explain where I am wrong
abhinowKatore
881
views
abhinowKatore
asked
Jan 18, 2023
Programming in C
programming-in-c
recursion
+
–
0
votes
4
answers
7
Self Doubt
A recursion program without a terminating condition will provide infinite output. True/False?
A recursion program without a terminating condition will provide infinite output. True/False?
Aryanzzzz
477
views
Aryanzzzz
asked
Jan 16, 2023
Algorithms
self-doubt
algorithms
recursion
+
–
0
votes
0
answers
8
C programming
What will be the return value of the below function, if it is called a sample(4)? int sample(int x){ if( x == 0 || x ==2) return 1; return (sample(--x) * (x--)); }
What will be the return value of the below function, if it is called a sample(4)? int sample(int x){ if( x == 0 || x ==2) return 1; return (sample( x) * (x ));}
abhinowKatore
640
views
abhinowKatore
asked
Dec 5, 2022
Programming in C
programming-in-c
recursion
bad-question
+
–
Page:
1
2
3
4
5
6
7
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register