Write a Program for Reverse of a string
#include<stdio.h> #include<conio.h> #include < string.h > void main() { char a [20], b[20]; int i,j = 0, n...
https://www.computersprofessor.com/2016/06/write-program-for-reverse-of-string.html
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char a [20], b[20];
int i,j = 0, n;
printf (“\n enter string”);
gets (a);
puts (a);
n = strlen ( a);
for (i = n–1; i >= 0; i ++)
b [j] = a [i];
j ++;
}
b [j]='\0';
printf ("\n reverse is \n”);
puts (b);
getch();
}