#include <stdlib.h>
#include <stdio.h>
struct card
{
char Top;
char Bottom;
};
int main()
{
int T,i;
struct card cards[4];
scanf("%d", &T);
for(i=0; i<3; i++)
{
scanf("%c%c%c", &cards[0].Top, &cards[1].Top, &cards[2].Top);
printf("%c%c%c\n", cards[0].Top, cards[1].Top, cards[2].Top);
}
return 0;
}
It does not correctly print the three characters, outside the for loop it scans and prints fine.