title: How to create a circular array?
body: <p>I am trying to create a circular reference to array. For example, </p>
  
  <p><code>float arr1[10] = {0,1,2,3,4,5,6,7,8,9};</code></p>
  
  <p>Then I use a variable in loop to access elements of array.</p>
  
  <pre><code>for (int i=0;i&lt;10;i++){
      std::cout&lt;&lt;arr1[i]&lt;&lt;std::endl;
      //other processing using arr1[i] indexing
  }
  </code></pre>
  
  <p>Here, I can only use <code>i&lt;=10</code>. If I want to make <code>i&lt;=16</code> and if <code>i&gt;10</code> then index should go to <code>arr1[0]</code> and proceed from there. What are preferable or recommended ways to do this? </p>