I am trying to fill a simple array with some characters, my loop looks likes this
for(i = 0; i <= 6; i++) {
printf("Enter each value of the plate number:");
scanf("%c", &arr[i]);
printf("i = %d\n", i);
}
When I execute the loop, I this is what happens,
Enter each value of the plate number:A
i = 0
Enter each value of the plate number:i = 1
Enter each value of the plate number:B
i = 2
Enter each value of the plate number:i = 3
Enter each value of the plate number:C
i = 4
Enter each value of the plate number:i = 5
Enter each value of the plate number:D
i = 6
I don't know why I am skipping every 2nd chance to get the user input.