To find the frequency of a number in an array using recursion
<p>My code blocks is giving an error.But i'm not able to find it anywhere in the</p>

<p>program.  it's saying</p>

<blockquote>
  <p>in Line 3 :expected ';',',' or ')' before '=' token</p>
</blockquote>

<pre><code> #include&lt;stdio.h&gt;

 int count_key1(int a[],int size,int key,int flag=0)
 {

     if(size!=0)
         {
             if(a[size-1]==key)
                 count_key1(a,size--,key,flag++);
         }
     else
        return flag;
 }
 int main()
 {
     int b[30]={1,4,2,3,2,6,6,9},key1=9,result;
     result=count_key1(b,8,key1,0);
     printf("%d is %d times present",key1,result);
     return 0;
 }
</code></pre>