How to reverse a string using a recursive function, without
swapping or using an extra memory?

Answers were Sorted based on User's Feedback



How to reverse a string using a recursive function, without swapping or using an extra memory?..

Answer / mahendra aseri

Using recursive Function:

void rev_str(char *str)
{
if(*str!=NULL)

rev_str(str+1);

printf("%c",str);
}

Is This Answer Correct ?    20 Yes 43 No

Post New Answer

More C Interview Questions

What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.

0 Answers  


What is the advantage of c?

0 Answers  


What is external and internal variables What is dynamic memory allocation what is storage classes in C

3 Answers  


write a proram to reverse the string using switch case?

0 Answers   Syntel,


What is floating point exception error? And what are different types of errors occur during compile time and run time? why they occur?

1 Answers  






What is the difference between strcpy() and memcpy() function in c programming?

0 Answers  


find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2

0 Answers   TCS,


Print the foll in C...eg when n=5 the o/p must b + + + + + + + + + + + + + + + + +

1 Answers  


What are the types of data types and explain?

0 Answers  


What is a memory leak? How to avoid it?

1 Answers  


what is pointer ?

10 Answers   Kernex Micro Systems,


what is the defrenece between structure and union

5 Answers   Aloha Technology,


Categories