First question! Very new to programming. I am looking to print an asterisk whenever a player has entered either 'a' or 'b' after a get_string function. Running this code and entering either 'a' and 'b' does not produce an asterisk whereas entering 'c' does produce an asterisk.
Why does it produce an asterisk only for the 'c' input?
What is the correct way to use of the OR function here?
Thanks for your help!
for(int i=0;i<strlen(input);i++)
{
if (input[i] == ('a' | 'b'))
{
printf("*");
}
}