Question

create a infinite recursion program (just a simple, unique and describe in each line)

create a infinite recursion program (just a simple, unique and describe in each line)

0 0
Add a comment Improve this question Transcribed image text
Answer #1
void func(int n){
    func(n+1);
}

There should be a base that should return for sum value of n.
But in this case there is no return statement.
This function calls itself no matter the value of n.
So, This is a infinite recursive function.

Example:
func(1) makes a call func(2)
func(2) makes a call func(3)
func(3) makes a call func(4)
func(4) makes a call func(5)
...
...
and so on
Add a comment
Know the answer?
Add Answer to:
create a infinite recursion program (just a simple, unique and describe in each line)
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT