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

Can I initialize unions?

1049


Why is %d used in c?

1007


Explain what is wrong with this statement? Myname = ?robin?;

1592


what is reason of your company position's in india no. 1.

2341


What are the types of data files?

1206


What is the main difference between calloc () and malloc ()?

1163


I have a varargs function which accepts a float parameter?

1057


What is a c token and types of c tokens?

1072


What is hashing in c language?

1322


Can a void pointer point to a function?

1030


What is the difference between array and pointer?

1035


How many data structures are there in c?

1130


What are loops c?

1059


What does c mean in basketball?

1000


What is a buffer in c?

1010