Is there any way to shorten if statement with bitwise or?

77 Views Asked by At

Is there a way to shorten the if statement with the bitwise or and strcmp?

if 
(strcmp(level, array[1])==0||
strcmp(level, array [2])==0||
strcmp(level, array [3])==0)
{
/*Code*/
}

The goal is to shorten the code of if statement

0

There are 0 best solutions below