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 / sanny

#include<stdio.h>
#include<conio.h>
main()
{
int num, rem=0;
printf("\n Enter the number ");
scanf("%d", &num);
while(num>0)
{
rem = (rem * 10) + (num % 10);
num = num / 10;
}
printf("\n Reverse of the number is %d", rem);
getch();
}

Is This Answer Correct ?    10 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a memory leak? How to avoid it?

1338


Explain the concept and use of type void.

1112


What is meant by 'bit masking'?

1390


Does c have function or method?

993


Tell me with an example the self-referential structure?

1012


What does main () mean in c?

1095


c program to compute AREA under integral

2394


What is the usage of the pointer in c?

1112


What are reserved words with a programming language?

1135


What does c mean?

1040


What is getche() function?

1038


what do the 'c' and 'v' in argc and argv stand for?

1166


What is a protocol in c?

1001


What is a pointer and how it is initialized?

1154


a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if

1139