/in/foo.c: In function 'main':
/in/foo.c:20:5: error: 'i' undeclared (first use in this function)
{a[i]=1-a[i];
^
/in/foo.c:20:5: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:22:9: warning: left-hand operand of comma expression has no effect [-Wunused-value]
a[i]=0,a[i-1]=a[i-1]+1;}
^
/in/foo.c: In function 'search':
/in/foo.c:28:17: error: 'n' undeclared (first use in this function)
{for(int i=0;i<n;i++)
^
/in/foo.c:31:10: error: 'i' undeclared (first use in this function)
return i;
^
/in/foo.c:34:2: warning: control reaches end of non-void function [-Wreturn-type]
}
^