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
Can I initialize unions?
Why is %d used in c?
Explain what is wrong with this statement? Myname = ?robin?;
what is reason of your company position's in india no. 1.
What are the types of data files?
What is the main difference between calloc () and malloc ()?
I have a varargs function which accepts a float parameter?
What is a c token and types of c tokens?
What is hashing in c language?
Can a void pointer point to a function?
What is the difference between array and pointer?
How many data structures are there in c?
What are loops c?
What does c mean in basketball?
What is a buffer in c?