GATE Overflow for GATE CSE
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
Filter
  • User abhishek29
  • Wall
  • Recent activity
  • All questions
  • All answers
  • Exams Taken
  • All Blogs

Answers by abhishek29

2 votes
1
GO Classes 2023 | Weekly Quiz 4 | Question: 18
What will be output of following program? void xyz(int i) { if(--i) { xyz(i++); printf("%d",i); } } main() { xyz(5); } It is an infinite recursion since no base case $2345$ $54321$ $1234$
answered in Programming Mar 26, 2022
295 views
  • goclasses_wq4
  • goclasses
  • programming
  • programming-in-c
  • recursion
  • 1-mark
3 votes
2
GO Classes 2023 | Weekly Quiz 4 | Question: 19
What will be the output printed by $\text{mystery}1(0,6)$? void mystery1(int a, int b) { if (a <= b) { int m = (a + b) / 2; printf("%d", m); mystery1(a, m-1); mystery1(m+1, b); } }
answered in Programming Mar 26, 2022
295 views
  • goclasses_wq4
  • goclasses
  • programming
  • programming-in-c
  • recursion
  • numerical-answers
  • 1-mark
0 votes
3
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); } }
answered in Programming Mar 26, 2022
340 views
  • goclasses_wq4
  • goclasses
  • programming
  • programming-in-c
  • recursion
  • numerical-answers
  • 1-mark
4 votes
4
GO Classes 2023 | Weekly Quiz 4 | Question: 22
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); }
answered in Programming Mar 26, 2022
436 views
  • goclasses_wq4
  • goclasses
  • programming
  • programming-in-c
  • recursion
  • numerical-answers
  • 2-marks
2 votes
5
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); }
answered in Programming Mar 26, 2022
340 views
  • goclasses_wq4
  • goclasses
  • programming
  • programming-in-c
  • recursion
  • numerical-answers
  • 1-mark

Subscribe to GATE CSE 2023 Test Series

Subscribe to GO Classes for GATE CSE 2023

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

  • DRDO Previous Year Papers
  • From Rank 4200 to 64: My Journey to Success in GATE CSE Exam
  • What are the key things to focus on during the final 10-15 days before the GATE exam to improve performance?
  • All India GO Classes Mock test
  • NTA UGC NET JRF December 2022 Apply Online Form 2023

Subjects

  • All categories
  • General Aptitude (2.5k)
  • Engineering Mathematics (9.3k)
  • Digital Logic (3.3k)
  • Programming and DS (5.8k)
  • Algorithms (4.6k)
  • Theory of Computation (6.7k)
  • Compiler Design (2.3k)
  • Operating System (5.0k)
  • Databases (4.6k)
  • CO and Architecture (3.8k)
  • Computer Networks (4.6k)
  • Non GATE (1.3k)
  • Others (2.4k)
  • Admissions (649)
  • Exam Queries (842)
  • Tier 1 Placement Questions (17)
  • Job Queries (74)
  • Projects (9)
  • Unknown Category (853)

Recent Blog Comments

  • It's not a standard resource, don't follow them.
  • https://byjus.com/maths/diagonalization/
  • @amit166 can you share the reference of the...
  • Twist at every point Man
  • Diagonalization of a MatrixIf there is an...
  • Send feedback
  • Rank Predictor
  • College Prediction
  • Useful Links
  • FAQ
  • Corrections
  • Discuss
  • Copyright
  • Request
  • Testimonials
  • Chat Logs
  • Chat
  • Badges
  • Search tips
  • Exam Category
  • Blog Category
  • Blog Tags
  • Privacy
  • Test Series
  • Contact Us
Developed by Chun