How to reverse a string using a recursive function, without
swapping or using an extra memory?
Answer Posted / mahendra aseri
Using recursive Function:
void rev_str(char *str)
{
if(*str!=NULL)
rev_str(str+1);
printf("%c",str);
}
| Is This Answer Correct ? | 20 Yes | 43 No |
Post New Answer View All Answers
How do you sort filenames in a directory?
What is the method to save data in stack data structure type?
what do you mean by enumeration constant?
Difference between exit() and _exit() function?
What is the scope of global variable in c?
What is volatile variable in c?
what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above
How can I swap two values without using a temporary?
What is a nested formula?
Tell me is null always defined as 0(zero)?
Why isn't any of this standardized in c? Any real program has to do some of these things.
Combinations of fibanocci prime series
Explain how do you sort filenames in a directory?
How can I list all of the predefined identifiers?
What are identifiers in c?