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
What is a memory leak? How to avoid it?
Explain the concept and use of type void.
What is meant by 'bit masking'?
Does c have function or method?
Tell me with an example the self-referential structure?
What does main () mean in c?
c program to compute AREA under integral
What is the usage of the pointer in c?
What are reserved words with a programming language?
What does c mean?
What is getche() function?
what do the 'c' and 'v' in argc and argv stand for?
What is a protocol in c?
What is a pointer and how it is initialized?
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