write a C code
to reverse a string using a recursive function, without
swapping or using an extra memory.

Answer Posted / sampath

void reverse(*str)
{
if(*str)
{
reverse(str+1);
putchar(*str);
}
}

Is This Answer Correct ?    58 Yes 51 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is #define size in c?

839


Explain how can I open a file so that other programs can update it at the same time?

843


Why isn't it being handled properly?

823


write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)

1860


How can I pad a string to a known length?

779


Is main a keyword in c?

822


Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.

1116


Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result

1659


What are lookup tables in c?

737


int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer

837


which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above

1373


What is the purpose of sprintf() function?

797


how we can make 3d venturing graphics on outer interface

4328


What is the use of pointers in C?

825


What is scanf () in c?

825