Miscellany
public text v1 · immutable#include <stdio.h>
#include <string.h>
char reverse(char *s, char *t);
int main()
{
char source[25];
char target[25];
printf("Enter the source string\n");
scanf("%S", &source);
reverse(source, target);
printf("The target string is %s\n", target);
getch();
}
char reverse(char *s, char *t)
{
int c=0,d=0,l=0;
l=strlen(s);
for(c=l;c>0;c--,d++)
t[c]=s[d];
t[d+1]='\0';
}