title: How can I copy a part of an array to another array in C++?
body: <p>This is the same question asked in C# but i need for C++</p>
  
  <p>How can I copy a part of an array to another array?</p>
  
  <p>Consider I'm having</p>
  
  <pre><code>    int[] a = {1,2,3,4,5};
  </code></pre>
  
  <p>Now if I give the start index and end index of the array a it should get copied to another array.</p>
  
  <p>Like if I give start index as 1 and end index as 3, the elements 2, 3, 4 should get copied in the new array.</p>
  
  <p>In C# it is done as following</p>
  
  <pre><code>     int[] b = new int[3];
      Array.Copy(a, 1, b, 0, 3);
  </code></pre>
  
  <p>Is there any simple way like this to do the same task in C++?</p>