Hey guys! Im new to C and i dont know why im getting segmentation fault error in this code: #include int binarySearchRecursive(int array[], int l, int r, int x) { if (r >= 1) { int middleValue = l + (r - 1) / 2; if (array[middleValue] == x) return middleValue; if (array[middleValue] > x) return binarySearchRecursive(array, l, middleValue - 1, x); return binarySearchRecursive(array, middleValue + 1, r, x); } return -1; } int main(void) { // Testing the recursive way first. int array1[] = { 2, 3, 4, 10, 50, 900 }; int n = sizeof(array1) / sizeof(array1[0]); int x = 10; int result = binarySearchRecursive(array1, 0, n - 1, x); (result == -1) ? printf("Element is not present in array") : printf("Element is present at index %d", result); return 0; }