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
what is a function method?give example?
What are the 5 types of inheritance in c ++?
How can I remove the leading spaces from a string?
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
What is the size of structure pointer in c?
What is static identifier?
What is #define used for in c?
What is wrong with this initialization?
Explain how many levels deep can include files be nested?
c program for searching a student details among 10 student details
What is extern variable in c with example?
#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }
What is #define?
Simplify the program segment if X = B then C ← true else C ← false
How to explain the final year project as a fresher please answer with sample project