When I try to compile this small program everything is correct but when I run it I find some problems. For example, I can't type the "c" variable in the second element of the table and so on.
#include <stdio.h>
struct point{
char c;
int x,y;
};
int main(void)
{
int size = 4;
struct point tp[size];
for(int i = 0; i < size; i++ )
{
printf("entrer le nom du point no %d: ", i+1);
tp[i].c = fgetc(stdin);
printf("x = ");
scanf("%d", &tp[i].x);
printf("y = ");
scanf("%d", &tp[i].y);
}
}