Prog#088: Merge two arrays

/* 
Program#88
Merge two arrays
*/

#include <stdio.h>
main(){
char a[100],b[100],c[100];
int i,j;

i=0;
scanf("%c",&a[i]);
while(a[i]!='$'){
i++;
scanf("%c",&a[i]);
}
a[i]='\0';

i=0;
scanf("%c",&b[i]);
while(b[i]!='$'){
i++;
scanf("%c",&b[i]);
}
b[i]='\0';

i=0;
while(a[i]!='\0'){
c[i]=a[i];
i++;
}
j=0;

while(b[j]!='\0'){
c[i]=b[j];
j++;
i++;
}

c[i]='\0';
printf("\n %s\n %s \n%s",a,b,c);
}