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

write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3

1639


Can include files be nested? How many levels deep can include files be nested?

652


Can you explain the four storage classes in C?

639


Differentiate between static and dynamic modeling.

613


Give basis knowledge of web designing ...

1569






A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream

664


What is string in c language?

617


What are the differences between new and malloc in C?

604


number of times a digit is present in a number

1537


What does volatile do?

562


What are the types of variables in c?

578


In C language, a variable name cannot contain?

737


What is d scanf?

584


 write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare.  You will then tabulate this information in another file.

1722


Can a variable be both static and volatile in c?

604