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

Answer Posted / noone

/* this one is a copy of a earlier one posted i just made a
small adjustment */
void reverse(char *str)
{
if(*str)
{
reverse(str+1);
putchar(*str);
}
}

Is This Answer Correct ?    18 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is a pointer variable declared?

596


What is %d called in c?

763


Explain enumerated types in c language?

608


Explain why c is faster than c++?

579


Explain how many levels deep can include files be nested?

630






Why we use conio h in c?

591


What are volatile variables in c?

525


What is exit() function?

563


typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none

720


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 .

1906


What is the difference between #include and #include 'file' ?

610


What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file

672


What is extern c used for?

571


What are the string functions? List some string functions available in c.

609


What is function definition in c?

590