title: Range within an array in C
body: <p>I came up with an algorithm and I wanted to ask something. Is there any way to set a range of values within an array?</p>
  
  <p>Eg</p>
  
  <pre><code>int N = 10;
  int array[N] = {2,6,5,9,4,3,5,9,4,9};
  </code></pre>
  
  <p>and using a loop to increase the start value with each pass.</p>
  
  <pre><code>for (int A = 1; A &lt; N - 2; A++) {
      for (int B = 1; B &lt; N - 1; B++) {
          int ProfitA = Sum(array[0...A-1]);
          int ProfitB = Sum(array[A...A+B-1]);
          int ProfitC = Sum(array[A+B...N-1]);
      }
  }
  </code></pre>
  
  <p>So is there any way to set the range of  values in each array using the above C -pseudocode?</p>