1. #include <stdio.h>
  2.  
  3. int is_pangram(char *str)
  4. {
  5.         int set = 0;
  6.  
  7.         for (; *str != '\0'; str++)
  8.         {
  9.                 if (*str >= 'a')
  10.                         set |= setBit(*str - 'a' + 1);
  11.                 else
  12.                         set |= setBit(*str - 'A' + 1);
  13.                 if (set == 0x3FFFFFF)
  14.                         return 1; //return true
  15.         }
  16.  
  17.         return 0;
  18. }
  19.  
  20. int setBit(int toSet)
  21. {
  22.         switch (toSet)
  23.         {
  24.         case 1: return 0x1;
  25.         case 2: return 0x2;
  26.         case 3: return 0x4;
  27.         case 4: return 0x8;
  28.         case 5: return 0x10;
  29.         case 6: return 0x20;
  30.         case 7: return 0x40;
  31.         case 8: return 0x80;
  32.         case 9: return 0x100;
  33.         case 10: return 0x200;
  34.         case 11: return 0x400;
  35.         case 12: return 0x800;
  36.         case 13: return 0x1000;
  37.         case 14: return 0x2000;
  38.         case 15: return 0x4000;
  39.         case 16: return 0x8000;
  40.         case 17: return 0x10000;
  41.         case 18: return 0x20000;
  42.         case 19: return 0x40000;
  43.         case 20: return 0x80000;
  44.         case 21: return 0x100000;
  45.         case 22: return 0x200000;
  46.         case 23: return 0x400000;
  47.         case 24: return 0x800000;
  48.         case 25: return 0x1000000;
  49.         case 26: return 0x2000000;
  50.         }
  51. }
  52.  
  53. int main()
  54. {
  55.         char str[] = { "abdefghijklmopqrstuvwxyz" };
  56.         //char str = "abdefghijklmopqrstuvwxyz"; //오류남
  57.  
  58.         if (is_pangram(str))
  59.                 puts("true");
  60.         else
  61.                 puts("flase");
  62.  
  63.         system("pause");
  64.         return 0;
  65. }


지각함 ㅜㅜ


메인에 주석처리 한것처럼 입력하면 오류나는데


왜 나는걸까