Could not agree more.

Quick question though, since function takes array itself as an argument why
does it need array length also as argument..may be to simplify the function
body?
 On 26 Feb 2014 03:12, "Senthil Kumaran" <notifications@github.com> wrote:

> In source/cprogramming/Ex_3.1_binsearch-2.rst:
>
> >  ============
> >
> > +The program returns the position of element 9 in the defined array which is 4.
>
> This is how I was seeing the program. The program demonstrates a binsearchfunction which takes a input element (x) to search for, an array of
> integers and the length of the array as arguments.
>
> The program determines the position of the element (x) by doing a binary
> search. ( How binary search is done can be explained a bit. Like, you are
> right that it works with sorted array only, and it finds a mid element
> compares and goes left or goes right, etc).
>
> Do you agree with the thought process?
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/uthcode/uthcode/pull/56/files#r10041841>
> .
>