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 spanning Tree?
What is the use of bit field?
Explain function?
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
Explain the properties of union.
How do I use void main?
Are enumerations really portable?
Did c have any year 2000 problems?
The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none
What are the types of pointers?
What is the difference between fread and fwrite function?
Why is c not oop?
How do you use a pointer to a function?
How can I sort more data than will fit in memory?
What is data types?