Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / billy

string reverse with out recursion


void rev( char *p )
{

char tmp;
int len =strlen(p)-1;
for( int i=0 ; i <= len/2 ; i++ )
{


tmp = p[i] ;
p[i] = p[len - i ] ;
p[len - i ] = tmp ;
}


printf("%s",p);


}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a rvalue?

1149


Explain how are 16- and 32-bit numbers stored?

1213


Why double pointer is used in c?

998


What is meant by type specifiers?

1092


Why is c called a structured programming language?

1226


Is c language still used?

944


I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.

2171


Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.

1038


Why main function is special give two reasons?

1497


What are the 3 types of structures?

995


the question is that what you have been doing all these periods (one year gap)

2031


What is a dynamic array in c?

1086


What is data structure in c and its types?

1029


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

4254


Define C in your own Language.

1041