title: Dot Product function in C language
body: <p>I am looking for some help in writing function below.</p>
  
  <p>It looks like:
  <code>double dot_product(double v[],double u[],int n)</code>, 
  where n is length of the vector</p>
  
  <p>Is it correct?</p>
  
  <pre><code>double dot_product(double v[], double u[], int n)
  int i;
  for (i = 0; i &lt; n; i++)
  {
  result += v[i]*u[i];
  }
  </code></pre>