EduRev
Course Title
Home
Explore Courses
Partner Courses
Discuss
Pricing Plans
Change Class/Exams
My Profile
EduRev App
Switch to Infinity
View Analysis
Create Your Own Test
Raise a Demand
Ask a doubt
Report this question
Less
EduRev
Courses
Get the App
Signup / Login
Sign in
Open App
×
Welcome Back
Continue with Google
Continue with Facebook
OR
OR
Login
Forgot Password?
New User?
Sign Up
×
Create your account now
Continue with Google
Signup with Email
OR
Gender
Male
Female
Others
I accept the
Terms & Conditions
.
Create Account
Already Have an Account?
Login
Computer Science Engineering (CSE) Question
What does the following function do?
int fun(int x, int y)
{
if (y == 0) return 0;
return (x + fun(x, y-1));
a)
x + y
b)
x + x*y
c)
x*y
d)
xy
Correct answer is option 'C'. Can you explain this answer?
Related Test
Test: Recursion- 3
Attach
Answer
to Question
Answers
Gate Gurus
Jun 09, 2021
The function adds x to itself y times which is x*y.
Upvote
Reply
Share
Report
Share
Attach
Reply
to Gate Gurus
Answer this doubt
The function adds x to itself y times which is x*y.
Top Courses for Computer Science Engineering (CSE)
GATE Computer Science Engineering(CSE) 2023 Mock Test Series
Question Bank for GATE Computer Science Engineering
Computer Networks
RRB JE for Computer Science Engineering
Database Management System (DBMS)
Related Content
Examples x+y function - Trigonometric Functions
Video | 07:35 min
Building Line Following and Food Following RobotsBuilding Line Following and Food Following
Doc | 19 Pages
L12 : x+/-y function - Trigonometry Functions, Mathematics, Class 11
Video | 12:12 min
180 Degreee Plus Minus X Function - Trigonometric Functions, Mathematics
Video | 02:31 min
X+/-y function (Part - 12) - Trigonometric Functions, Math, Class 11
Video | 12:12 min
Download free EduRev App
Track your progress, build streaks, highlight & save important lessons and more!
The function adds x to itself y times which is x*y.
×
Share your doubts
By continuing, I agree that I am at least 13 years old and have read and agree to the
terms of service and privacy policy
.
Continue with Google
325,000
Videos & Docs
1500
Courses
75,000
Tests
80 lakh
Students
x
For Your Perfect Score in
Computer Science Engineering (CSE)
The Best you need at One Place
Start Your Infinity Experience
Facebook
Twitter
Google
WhatsApp
Email
Copy Link
×
Unattempted Tests
Select a course to view your unattempted tests
×
Enter OTP
CONTINUE
Resend OTP
Change Number