![]() |
Recursion help
I need to right a recursion program to reverse a string
the condition is it should be only line tht line code should be of returning the value |
Re: Recursion help
Really interesting
Code:
#include <iostream.h> |
Re: Recursion help
I mean tht one line code should be of returning type.................I am not able to figure it out
|
Re: Recursion help
This one line is of returning type but as the function does not need to return anything and so it does not have a return statement.
Code:
((*(outArr+start) = inArr[cLen-1]) && (cLen > 0))?RevStr(inArr, outArr, start+1, cLen-1):0; |
Re: Recursion help
k thanx
|
Re: Recursion help
Quote:
Also with the return statement heres the code. Code:
#include <iostream.h> |
| All times are GMT +5.5. The time now is 17:43. |