不同的电脑不同输出

use*_*047 2 c arrays dev-c++

我在我的WxDev C++上编译了这段代码.从理论上讲,它应该输出用户的答案和正确的答案.除了coranswers数组的数组0之外,它只显示了一个空格.我尝试在其他PC上编译它,问题不存在.我尝试重新安装WxDev,即使用代码块替换它也是如此.好像问题就在我的电脑上.我该怎么办?

#include<stdio.h>
int main(){
char coranswers[20] = {'A', 'B', 'C', 'D', 'E', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A'};
char answers[20];
int count;
int grade = 0;

for(count = 0; count < 20; count++){
          printf("No.%d ", count+1);
          scanf("%s", &answers[count]);
          }
for(count = 0; count < 20; count++){
          printf("No.%d ", count+1);
          printf("Your answers : %c\n", answers[count]);
          if(answers[count] == coranswers[count]){
                            grade++;
                            }
          else{
               printf("Wrong answer, correct answer is %c\n", coranswers[count]);
          }
          }
          return 0;
          }
Run Code Online (Sandbox Code Playgroud)

sta*_*ker 5

您不希望将字符串读入char数组

scanf("%s", &answers[count]); // the format string should be "%c"
Run Code Online (Sandbox Code Playgroud)