title: Preventing array to go out of bounds when passed a method parameter
body: <p>First thing first. I am aware that there is no way direct way to find out size of an incoming array in a method as they are received as pointers. Situation I am facing is something similar but different in nature.</p>
  
  <p>I have a method something like this:</p>
  
  <pre><code>void method( int no_of_elements, int arr[])
  {
     /* checking if array has 'no_of_elements' of elements.
  }
  </code></pre>
  
  <p>I want to check if the integer array <code>arr[]</code> has <code>no_of_elements</code> or not. Based on this my method shall process further. I know it almost sounds like finding the size of <code>arr[]</code>. At-least that's the only way I could think to check my requirement. Any approach to solve this would be appreciated.</p>