title: While executing this program the char function does the returning the variable.i dont know why?
body: <p>Here in the program, findnumber function getting  array elements and the value to be searched via STDIN.The output which i expected is if the value equals any one of the element in the array it displays YES or else NO.</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;string.h&gt;
  char findNumber(int,int[],int);``
  int main()
  {
      int n,a[10],s;
      char c;
      c=findNumber(n,a,s);
      printf("%s",c);
      return 0;
  }
  char findNumber(int arr_count, int arr[], int k) 
  {
     int i=0,j,flag;
     char y="YES";
     char N="NO";
     scanf("%d",&amp;arr_count);
     scanf("%d",&amp;k);
     for (j=0;j&lt;arr_count;j++)
     {
        scanf("%d",&amp;arr[j]);
     }
     while(i&lt;arr_count)
     {
        if(arr[i]==k)
           flag=1;
        i++;
     }
     if(flag==1)
        return y;
     else
        return N;
  }
  </code></pre>
  
  <p>warning: initialization of 'char' from 'char *' makes integer from
  pointer without a cast [-Wint-conversion]
   char y="YES";
  warning: initialization of 'char' from 'char *' makes integer from
  pointer without a cast [-Wint-conversion]
   char N="NO";</p>