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


Please Help Members By Posting Answers For Below Questions

Explain the ternary tree?

608


What is the use of sizeof?

561


Explain what are bus errors, memory faults, and core dumps?

796


How can I rethow can I return a sequence of random numbers which dont repeat at all?

714


What are structural members?

578






Explain the properties of union.

615


How can a program be made to print the name of a source file where an error occurs?

739


Describe the modifier in c?

610


How do you search data in a data file using random access method?

844


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 .

1909


develop algorithms to add polynomials (i) in one variable

1749


How do I use strcmp?

647


What is the difference between test design and test case design?

1579


Explain the difference between #include "..." And #include <...> In c?

635


what will be maximum number of comparisons when number of elements are given?

1413