In a C++program, (a) Write a binary search function (using recursion) int binary_search(int val, int * a, int first, int last) which searches the values in the sorted array a[] from a[first] to a[last] to find an array element with value val. If it finds val, it returns the position of val in a. Other- wise it returns-1. For exa mple, given the array a[] = {1, 3, 5, 8, 12, 15, 20, 347, the call binary-search (5, a, 0, 7) returns 2, and the call binary-search(5, a, 3, 5) returns -1 b) Consider a situation where if a value is present in a sorted array then its multiplicity is huge, and for a given value, you want to find out the total number of its occurrences. Write a function (using recursion) int nuadec iat val, int a, int tirat, int lagt): which returns the number of occurrences of value val in array a] from a[first] to a[last]. For example, given the array a[] - f1, 2, 2, 2, 2, 2, 2, 5, 5}, the call nunOcc(2, a, 0, 8) returns 6, and the call nunOcc(3, a, 0, 8) returns 0. Show a run of your program on a couple of examples. What is the running time of your algorithm?