hey there can anyone tell me how this function work ?!
for function and void function :
int countoccu(int array[],int value,int lower,int upper)
{
    int counter=0;
    if(lower==upper)
        if (array[lower]==value)
            return 1;
        else
            return 0;
    else
        counter = counter + countoccu(array, value, lower+1, upper);
    if (array[lower]==value)
        counter++;
    return counter;
};
can anyone explain this for me
the output will be 3
void main()
{
    int array[5]={3,7,3,3,11};
    cout << countoccu(array,3,0,4) << endl;
}
 
     
     
     
    