title: Optimized way to check the value of a variable with enum members value
body: <p>Hello I have the code below:</p>
  
  <pre><code>enum {a, b, c, d, ..., z} abc;
  
  int main()
  {
    int val = 20;
    if (val == a || val == b ||val == c||val == d..... || val == z)
    {
      /*Do something*/
    }
  }
  </code></pre>
  
  <p>Is there any other way so that we can skip the <code>OR</code> operation because if there are 1000s of enum members then how can we do ahead with checking with all members.
  Please help.</p>