I am using c to create a very basic programme. I using scanf to get input from the console but when I use it with a char it just seems to 'skip' it.
Here is the code:
#include <stdio.h>
#include <string.h>
int main(){
char name[20];
char yn;
printf("Welcome to Benjamin's first C programme! \n\n");
do{
printf("What is your name? \t");
scanf("%s", name);
printf("\n");
printf("Is your name %s [y/n]?", name);
scanf("%c", &yn);
printf("\n");
} while(yn != 'y');
}