Prog#079: Copy one string array into another

/* 
Program#79
Copy one string array into another
*/

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

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

i=0;
while(a[i]!='\0'){
b[i]=a[i];
i++;

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