In my program I must store input characters in variables and then add them to arrays. But is there a way to use the same variable each time?
char str1,str2;
printf("insert character");
scanf("%c",&str1);
printf("%c",str1);
printf("insert character");
scanf("%c",&str2);
printf("%c",str2);
I would like to do something like this but using one variable. Also can I use scanf more than 1 times? It seems the executable stops before the second character is given.