title: error: passing 'float [4]' to parameter of incompatible type 'float'
body: <p>I have to create a function called print_array that takes two parameters: a float array and an integer (denoting the length of the array). The function should print the entire array of floats to a precision of two decimals. E.g.,</p>
  <pre><code>float a[] = {1.555, 3, 1.645, 178};
  print_array(a, 4);
  </code></pre>
  <p>It should give:</p>
  <pre><code>1.55, 3.00, 1.64, 178.00
  </code></pre>
  <p>My code goes as follows (a bit messy):</p>
  <pre><code>#include &lt;cs50.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  #include &lt;ctype.h&gt;
  #include &lt;math.h&gt;
  
  int times_two(int a);
  void print_int(int a);
  int half(int a);
  void print_float(float a);
  void max(float a);
  float average(float a);
  void print_array(float a, int b);
  
  
  int main (void)
  {
      int z = get_int(&quot;First Value for exercise 3? &quot;);
      int g = get_int(&quot;Second Value for exercise 3? &quot;);
      int max_value_1 = get_int(&quot;First Value (max) for exercise 4? &quot;);
      int max_value_2 = get_int(&quot;Second Value (max for exercise 4? &quot;);
      int x = 2;
      int y = half(x);
      float q = average(z + g);
      print_int(y);
      print_float(2.7444);
      print_float(q);
      if(max_value_1 &gt; max_value_2 || max_value_1 == max_value_2)
      {
          max(max_value_1);
      }
      else
      {
          max(max_value_2);
      }
      float a[] = {1.555, 3, 1.645, 178};
      print_array(a, 4);
  }
  float average(float a)
  {
      return a / 2;
  }
  
  int times_two(int a)
  {
      return a * 2;
  }
  
  int half(int a)
  {
      return a / 2;
  }
  
  void print_int(int a)
  {
      printf(&quot;Value Exercise 1 = %i\n&quot;, a);
  }
  
  void print_float(float a)
  {
      printf(&quot;Value Exercise 2/3 = %.2f\n&quot;, a);
  }
  
  void max(float a)
  {
      printf(&quot;Value Exercise 4 = %.2f\n&quot;, a);
  }
  
  void print_array(float a, int b)
  {
      printf(&quot;Value Exercise 4 = %.2f\n&quot;, a);
  }
  </code></pre>
  <p>For some other reason I get this error and really don't know how to fix them as I am new to ''functions'':</p>
  <pre><code>functions.c:37:17: error: passing 'float [4]' to parameter of incompatible type 'float'
      print_array(a, 4);
                  ^
  functions.c:13:24: note: passing argument to parameter 'a' here
  void print_array(float a, int b);
                         ^
  1 error generated.
  </code></pre>