write a C code
to reverse a string using a recursive function, without
swapping or using an extra memory.
Answer Posted / noone
/* this one is a copy of a earlier one posted i just made a
small adjustment */
void reverse(char *str)
{
if(*str)
{
reverse(str+1);
putchar(*str);
}
}
| Is This Answer Correct ? | 18 Yes | 5 No |
Post New Answer View All Answers
Explain goto?
When should structures be passed by values or by references?
What are the different categories of functions in c?
Compare interpreters and compilers.
Does * p ++ increment p or what it points to?
which is conditional construct a) if statement b) switch statement c) while/for d) goto
What is methods in c?
the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters
What should malloc() do?
Can we initialize extern variable in c?
How can I avoid the abort, retry, fail messages?
Define C in your own Language.
Write a Program to find whether the given number or string is palindrome.
How can you pass an array to a function by value?
What is the -> in c?