Getting wrong output

i made a program to find no of occurances of an element.
and i am not getting correct answer.please find the flaw in my code

@shivamgoel150 here corrected use void and pass by ref


dont forget to hit like and mark resolved if cleared :smiley: