title: How to generate random characters from only 'A', 'B', 'S' and 'Z' in C?
body: <p>This code generates random characters from 'A' to 'Z' but I need to generate random characters from only 'A', 'B', 'S' and 'Z' characters. Please help.</p>
  
  <pre><code>int main (void)
  {
      srand(time(NULL));
      char random;
  
      random = (rand() % 26) + 'A';
  
      printf ("Random: %c\n", random);
  
      return 0;
  }
  </code></pre>