title: Write a C program to find whether the given string is Lucky or not
body: <p>A string is said to be lucky if the sum of the ASCII values of the characters in the string is even. The function accepts a pointer to a string and returns an int.<br>
  The return value is 1 if the string is lucky and 0 otherwise.</p>
  
  <p>I have tried with the following code, but on execution I am getting some errors.</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;string.h&gt;
  int checklucky(char *a);
  int main()
  {
      int c;
      c=checklucky(char *a);
  
      if(c==1)
          printf("%s is lucky",a);
      else
          printf("%s is not lucky",a);
  
      return 0;
  }
  
  int checklucky(char *a)
  {
      char name[100];
      int sum=0,len,i;
      a=name;
  
      printf("Enter the input string\n");
      scanf("%s",name);
  
      len=strlen(name);
  
      for(i=0;i&lt;len;i++)
      {
          sum=sum+name[i];
      }
  
      if(sum%2==0)
          return (1);
      else
          return (0);
  }
  </code></pre>
  
  <p>Sample Input and Output 1:</p>
  
  <pre><code>Enter the input string
  anitha
  anitha is not lucky
  </code></pre>