Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Recent questions tagged recursion
0
votes
0
answers
31
Best Open Video Playlist for Recursion Topic | Programming
Please list out the best free available video playlist for Recursion from programming as an answer here (only one playlist per answer). We'll then select the best playlist and add to GO classroom video lists. You can add any ... standard ones are more likely to be selected as best. For the full list of selected videos please see here
makhdoom ghaya
asked
in
Study Resources
Aug 16, 2022
by
makhdoom ghaya
399
views
missing-videos
free-videos
video-links
go-classroom
recursion
1
vote
2
answers
32
Recursion
#include <stdio.h> int fun(int num) { while(num>0) { num=num*fun(num-1); } return num; } int main() { int x=fun(8); printf("%d",x); return 0; } Hello Folks, I have a doubt related to the above snippet of code. Why does the output of the above code be 0? Kindly help me with a detailed explanation.
ryandany07
asked
in
Programming in C
Aug 15, 2022
by
ryandany07
941
views
programming-in-c
recursion
5
votes
3
answers
33
GO Classes Scholarship 2023 | Test | Question: 17
Consider the following pair of mutually recursive functions. int f(int n){ if (n==0) return 1; return f(n-1)+g(n-1); } int g(int n){ if (n==0) return 1; return g(n-1) - f(n); } Which of the following is/are will evaluate to TRUE? $f(2) == g(0)$ $g(2)+f(1) == 0$ $g(4)+g(1) == 0$ $f(3)+f(0) == 0$
GO Classes
asked
in
Programming in C
Aug 6, 2022
by
GO Classes
632
views
goclasses-scholarship-test1
goclasses
programming
programming-in-c
functions
recursion
multiple-selects
2-marks
2
votes
3
answers
34
GO Classes Scholarship 2023 | Test | Question: 27
What will be the number of recursive calls for $\textsf{mystery(5)}$ including the first call? void mystery(int n) { if (n == 0 || n == 1) return 0; mystery(n-2); printf("%d", n); mystery(n-1); }
GO Classes
asked
in
Programming in C
Aug 6, 2022
by
GO Classes
567
views
goclasses-scholarship-test1
numerical-answers
goclasses
programming
programming-in-c
recursion
1-mark
3
votes
1
answer
35
GO Classes Scholarship 2023 | Test | Question: 28
What will be the output of the following program? #include<stdio.h> struct _go{ char b[20]; char *a; struct _go *c; }x[2] = {"GATE", "2023", x+1, "GO", "Classes", x}, *p = x; typedef struct_go go; go ... ;c, n-2); } int main() { printf("%s",mystry(p,2023)->a); } GATE $2023$ Run time error GO
GO Classes
asked
in
Programming in C
Aug 6, 2022
by
GO Classes
695
views
goclasses-scholarship-test1
goclasses
programming
programming-in-c
structure
recursion
2-marks
0
votes
1
answer
36
Recursive function
Consider the following recursive function which is used by dynamic programming. T(n) = { 0; if n<1 1; if n=1 T(n-1)+T(n-2)+1; if n>1} Assume for every function call T(i) it checks the table first , if it's value is ... of 'n' so that overflow cannot occur . ( Assume system allocate 4 byte to each stack entry which is sufficient for storing required data.)
Manisha Jaishwal
asked
in
Programming in C
Aug 6, 2022
by
Manisha Jaishwal
648
views
recursion
dynamic-programming
1
vote
3
answers
37
Which value of static variable is returned if it is present in return statement of a recursive function?
jverma
asked
in
Programming in C
May 23, 2022
by
jverma
1.0k
views
programming-in-c
recursion
self-doubt
3
votes
1
answer
38
GO Classes Test Series 2024 | Programming | Test 3 | Question: 19
#include<stdio.h> int test(int *a, int *b) { int c = *a-*b; if (c<0) return 0; else return (1 + test(&c, b)); } void main() { int x = 15; int y = 4; int a = test(&x,&y); printf("%d", a); } $2$ $3$ $4$ Run time error since we can not pass the address of local variable c in the function test.
GO Classes
asked
in
Programming in C
Apr 30, 2022
by
GO Classes
385
views
goclasses2024-programming-3-weekly-quiz
goclasses
programming
programming-in-c
functions
pointers
parameter-passing
recursion
2-marks
6
votes
3
answers
39
GO Classes Test Series 2024 | Programming | Test 2 | Question: 21
What will be the output of the following program? #include<stdio.h> int rec(int x, int y) { static int count = 0; if (x == 0) return count; count++; if (x > y) rec(x - y, y); else rec(x, y - x); return count; } main() { int i = 10, j = 2, n; n = rec(i, j); printf("%d", n); } $4$ $5$ $6$ Infinite loop
GO Classes
asked
in
Programming in C
Apr 24, 2022
by
GO Classes
402
views
goclasses2024-programming-2-weekly-quiz
goclasses
programming
programming-in-c
recursion
output
2-marks
6
votes
1
answer
40
GO Classes Test Series 2024 | Programming | Test 2 | Question: 23
What will be the output of the program below- int i = 1; void my_extern1(void); void my_extern2(void); int main() { int count = 0; while (i++<5) { static int i = 3; i++; count +=i; my_extern1(); } printf("%d", ... (); } void my_extern2(){ extern int i; if (i++ < 3) my_extern1(); } Infinite recursion $9$ $4$ $5$
GO Classes
asked
in
Programming in C
Apr 24, 2022
by
GO Classes
329
views
goclasses2024-programming-2-weekly-quiz
goclasses
programming
programming-in-c
recursion
output
2-marks
1
vote
1
answer
41
Applied Root Test Series
Let C(X) be the number of leaves in a binary tree rooted at T. Assume that IsLeaf(T) returns I if T is a leaf. Which of the following observations leads to a recursive implementation? C(T)=C(T.Left) +C(T.Right) C(T):C(T.Left)+C(T.Right)+1 C(T)=C(T.Left]+C(T.right)+Isleaf(T)
Nitesh_Yadav
asked
in
Programming in C
Apr 12, 2022
by
Nitesh_Yadav
306
views
recursion
programming-in-c
1
vote
0
answers
42
NIELIT 2022 April Scientist B | Section B | Question: 77
Consider the following two functions. void fun1(int n) { if(n == 0) return; printf("%d", n); fun2(n - 2); printf("%d", n); } void fun2(int n) { if(n == 0) return; printf(" ... %d", n); } The output printed when $\text{fun1}(5)$ is called is $53423122233445$ $53423120112233$ $53423122132435$ $53423120213243$
soujanyareddy13
asked
in
Others
Apr 12, 2022
by
soujanyareddy13
672
views
nielit2022apr-scientistb
programming
normal
tricky
recursion
1
vote
2
answers
43
Test Series
What is the time complexity of the below mentioned recursive function. int f(n) { if(n!=1) { return f(n/2)+f(n/2); } else return 10; } O(n) O(n^2) O(log n) O(n logn)
Nitesh_Yadav
asked
in
Algorithms
Apr 11, 2022
by
Nitesh_Yadav
275
views
algorithms
time-complexity
recursion
test-series
2
votes
3
answers
44
GO Classes 2023 | Weekly Quiz 4 | Question: 17
How many times is foo activated (called), including the first "$\text{foo}(3,12)$" $\text{max()}$ and $\text{min()}$ are functions that return maximum and minimum respectively. int foo(int a, int b) { if (a==b) { return b; } int mn =min(a,b), mx =max(a,b); return foo(mn,mn) + foo( mx - mn , mn); }
GO Classes
asked
in
Programming in C
Mar 26, 2022
by
GO Classes
539
views
goclasses_wq4
numerical-answers
goclasses
programming
programming-in-c
recursion
2-marks
5
votes
3
answers
45
GO Classes 2023 | Weekly Quiz 4 | Question: 20
What will be output printed by $\text{mystery}2(6)$? void mystery2(int n) { if (n > 0) { printf("%d", n); mystery2(n-2); mystery2(n-3); printf("%d", n); } }
GO Classes
asked
in
Programming in C
Mar 26, 2022
by
GO Classes
532
views
goclasses_wq4
goclasses
programming
programming-in-c
recursion
numerical-answers
1-mark
4
votes
3
answers
46
GO Classes 2023 | Weekly Quiz 4 | Question: 21
What will be the output printed by $\text{mystery}3(6)$? void mystery3(int n) { if (n == 0 || n == 1) return; mystery3(n-2); printf("%d", n); mystery3(n-1); }
GO Classes
asked
in
Programming in C
Mar 26, 2022
by
GO Classes
574
views
goclasses_wq4
goclasses
programming
programming-in-c
recursion
numerical-answers
1-mark
Page:
« prev
1
2
3
4
5
6
7
next »
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent questions tagged recursion
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...