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...

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

Answer Posted / bret

void revDisplay (char a[])
{

if(strlen(a) != 0)
{
revDisplay(a+1);
cout << a[0];
}
}

Is This Answer Correct ?    6 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you find out how much memory is available?

1074


Why double pointer is used in c?

1048


What are extern variables in c?

1000


What is the function of volatile in c language?

1141


Define Array of pointers.

1115


What is the c value paradox and how is it explained?

1063


How many identifiers are there in c?

1032


any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()

1133


What does the error message "DGROUP exceeds 64K" mean?

1235


Can stdout be forced to print somewhere other than the screen?

1053


Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.

1119


What is define directive?

1162


What is bash c?

1019


What is pass by value in c?

1077


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

1009