When I run that, after the first iteration everthings looks ok, the for loop print "write char" twice and after wait for the input. From what I understand the values are not really assigned(not even in the first iteration). Some help?
#include <stdio.h>
int main(){
int i;
char a[100];
for(i=1;i<=5;i++){
printf("print char\n");
scanf("%c",&a[i]);
}
} //this is my code