Let's say I have
char a[10], b[10], c[22];
Is there anyway I can copy the content of a and b to c?
I know how to copy one by one but I dont know how to copy more than 1 string.
Maybe I can do strlen(a), and strlen(b) and then do something like
for(n=0;n<strlen(a);n++){
c[n]=a[n];}
for(i=0;i<strlen(b),i++{
c[i+strlen(a)]=b[i];
c[strlen(a)+strlen(b)]='\0';}
Edit: I use the above method with some modification and I got it worked. However, it is kinda long.
is there any shorter way to do this?