prog.c:3:6: warning: return type of ‘main’ is not ‘int’ [-Wmain]
void main()
^~~~
prog.c: In function ‘main’:
prog.c:6:17: error: ‘o’ undeclared (first use in this function)
int flag,count=o;
^
prog.c:6:17: note: each undeclared identifier is reported only once for each function it appears in
prog.c:10:2: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration]
gets(string);
^~~~
prog.c:30:22: error: expected identifier before ‘(’ token
else if(flag==1)&&(string[count]='\0'))
^
prog.c:30:4: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
else if(flag==1)&&(string[count]='\0'))
^~~~
prog.c:30:42: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘else’
else if(flag==1)&&(string[count]='\0'))
^
prog.c:30:42: error: expected statement before ‘)’ token
prog.c:35:4: error: ‘else’ without a previous ‘if’
else
^~~~