i've written a simple program, where the program takes and imput and prints out the characters in sequence and counts them
char name[100];
int counter=0
printf("Enter name and surname:");
scanf("%s",&name);
for(int i=0; i<(strlen(name)); i++){
printf("%c \n",name[i]);
counter++;
printf("%d",counter)
for some reason , when i imput John Snow, it prints out only
J
o
h
n
4
desired output
J
o
h
n
S
n
o
w
10
any help please? within reasonable skill level :D if posible no malloc() free() and memory things, its supposed to be quite easy :D