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 ## preprocessor operator in c?

1042


What is non linear data structure in c?

984


Can we access the array using a pointer in c language?

1012


What is a shell structure examples?

1051


Which of these functions is safer to use : fgets(), gets()? Why?

1062


What is const volatile variable in c?

1004


code for replace tabs with equivalent number of blanks

2108


What is this infamous null pointer, anyway?

999


Is r written in c?

1126


Can the size of an array be declared at runtime?

1043


Explain Function Pointer?

1116


What is const keyword in c?

1133


Can we compile a program without main() function?

1084


What are the advantages of using linked list for tree construction?

1042


What is difference between union and structure in c?

1092