Hey, I'm new to C programming and am having trouble reading in characters from the keyboard. When I call the function (below), I can enter three characters before the compiler skips to the next part of my program. I know it should be very basic, but I'm not sure if its a problem with my laptop.
Code:
void char_test() {
char a, b, c, d, e, f;
scanf("%c",&a);
scanf("%c",&b);
scanf("%c",&c);
scanf("%c",&d);
scanf("%c",&e);
scanf("%c",&f);
}
I've simplified it as much as I can to try to figure it out myself.
Any help would be much appreciated.