what I want to do is input characters in character array in loop .I am new to c programming and don't know uses of pointers very well.my input is something like this :
INPUT:
a b
c d
e f upto n times
I have declared two arrays char a[n],b[n]; and I want to input a in a[0], b in b[1], c in a[2]...
Here is my attempt
char a[n],b[n];
for(i=0;i<n;i++)
{
scanf("%c %c",&a[i],&b[i]);
printf("%c %c",*(a+i),*(b+i));
}
but this doesn't work!!if I input: a b the output is a a `