I want to have 3 inputs of symbols e.g. |
or %
, but instead of getting | | %
, I got | |
.
Terminal:
| ^ !
| ^
The code is here:
#include <stdio.h>
char a[10], b[10], c[10];
int i;
int count;
int main(int argc, char const *argv[]) {
scanf("%d", &count);
for (i = 0; i < count; i++) {
scanf("%c %c %c", &a[i], &b[i], &c[i]);
printf("%c %c %c\n", a[i], b[i], c[i]);
}
return 0;
}
Please tell me what am I doing wrong. Thanks.