c-array related bug and syntax error fixing necessary