title: Search for a number in an array - C
body: <p>Alright.. I have been trying to make this code work, but for some reason it doesn't and I cannot seem to find the issue. Can someone clear it out? It's supposed to run 5 numbers, and you should then enter a desired number you'd like to know whether exist or not in the array. It just keeps saying no. </p>
  
  <pre><code>void search_for_number(int *a, int search);
  
  int main(void)
  {
    int number[5];
    int i, search, a = 1;
  
    for(i = 0; i &lt; 5; i++)
    {
      printf("Number %d of 5: \n", a++);
      scanf("%d", &amp;number[i]);
    }
  
    printf("\nWhat number should we search for?: \n");
    scanf("%d", &amp;search);
  
    search_for_number(&amp;number[i], search);
  }
  
  void search_for_number(int *a, int search)
  {
    int i;
  
    for(i = 0; i &lt; 5; i++)
    {
      if(*a == search)
      {
        printf("%d is present!\n", search);
      }
    }
  
    if(*a != search)
    {
      printf("%d is not present.\n", search);
    }
  }
  </code></pre>