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
Explain the ternary tree?
What is the use of sizeof?
Explain what are bus errors, memory faults, and core dumps?
How can I rethow can I return a sequence of random numbers which dont repeat at all?
What are structural members?
Explain the properties of union.
How can a program be made to print the name of a source file where an error occurs?
Describe the modifier in c?
How do you search data in a data file using random access method?
hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .
develop algorithms to add polynomials (i) in one variable
How do I use strcmp?
What is the difference between test design and test case design?
Explain the difference between #include "..." And #include <...> In c?
what will be maximum number of comparisons when number of elements are given?