I have learnt a few languages in the past and I thought it would be a good I idea to learn C.
I am having a little trouble with scanf...
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");
printf("What is your name? \t"); scanf("%s", name); printf("\n");
printf("Is your name %s? [y/n]", name); scanf("%s", yn);
}
I am having trouble with: scanf("%s", yn)