write a C code
to reverse a string using a recursive function, without
swapping or using an extra memory.
Answer Posted / piyush kumar
char gacstring="piyush";
int giindex=0;
voidfnreverse();
void main()
while(gacstring[giindex]!='\0'){
giindex++;
voidfnreverse();
}
if(giindex>0)
giindex--;
printf("%c",chargacstring);
return 0;
}
| Is This Answer Correct ? | 4 Yes | 14 No |
Post New Answer View All Answers
What are pointers really good for, anyway?
How can I manipulate individual bits?
What’s the special use of UNIONS?
application attempts to perform an operation?
If errno contains a nonzero number, is there an error?
When should structures be passed by values or by references?
How would you rename a function in C?
Is c easier than java?
What is a sequential access file?
What is new line escape sequence?
What is multidimensional arrays
What are the advantages of using macro in c language?
What is context in c?
What are the restrictions of a modulus operator?
what are # pragma staments?