I coded a strcat function. But my function doesn't run in this way -----> char * mystrcat(char *s,char *t). I want to return a pointer. Can you help me?
#include <stdio.h>
void mystrcat(char *s,char *t)
{
while(*s!='\0')
s++;
s--;
while((*(s+1)=*t)!='\0')
{ s++;
t++;
}
}
int main()
{
char str[30], str1[30];
gets(str);
gets(str1);
mystrcat(str, str1);
printf("%s\n",str);
return 0;
}