I have to check if a character(string) contains a scanned letter.
char password[15]="STACKOVERFLOW";
char check;
printf("Type in a letter to check if it is in the password/n");
scanf("%c", check);
Now I want to check if the check is in the password and print true or false.
For starters use
instead of
to skip white space characters from the input stream.
To check whether a character is present in a string use the standard function
strchr
declared in the header<string.h>
. For exampleOr