To check whether a string has all the alphabets a - z

Given a string , check whether it contains all the characters from a to z.



Implementation:


#include <stdio.h>
#define MAX 100000
int main()
{
     int t;
     char s[MAX],count[26],c,i,flag;
     scanf("%d",&t);
     while(t--)
     {
          flag=0;
          scanf("%s",&s);
          c=0;
          for(i=0;i<26;i++)
          {
               count[i]=0;
          }
          while(s[c]!='\0')
          {
               if(s[c]>='a' && s[c]<='z')
               count[s[c]-'a']++;
               c++;
          }
          for(c=0;c<26;c++)
          {
               if(count[c]==0)
               {
                    flag=0;
                    break;
               }
               else
               flag=1;
          }
          if(flag==1)
          printf("YES\n");
          else
          printf("NO\n");
     }
return 0;
}