for(int i=0,int y=19;i<=19,y>=0;i++,y--) { char k[y]=char x[i]; } I have declared char[20] for both k and x ,initialized x and now I'm trying to reverse the string. It is showing error expected ; before int and y was not declared in scope.