Record Detail

Compile Error

/in/ex2.c: In function 'main':
/in/ex2.c:8:2: error: implicit declaration of function 'scanf' [-Werror=implicit-function-declaration]
  scanf("%d", &order);
  ^~~~~
/in/ex2.c:8:2: error: incompatible implicit declaration of built-in function 'scanf' [-Werror]
/in/ex2.c:8:2: note: include '<stdio.h>' or provide a declaration of 'scanf'
/in/ex2.c:11:17: error: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Werror=format=]
  while (scanf("%d", arr[MAX_LENGTH]) != EDF)
                ~^   ~~~~~~~~~~~~~~~
/in/ex2.c:11:41: error: 'EDF' undeclared (first use in this function)
  while (scanf("%d", arr[MAX_LENGTH]) != EDF)
                                         ^~~
/in/ex2.c:11:41: note: each undeclared identifier is reported only once for each function it appears in
/in/ex2.c:24:3: error: implicit declaration of function 'printf' [-Werror=implicit-function-declaration]
   printf("%d", arr[i]);
   ^~~~~~
/in/ex2.c:24:3: error: incompatible implicit declaration of built-in function 'printf' [-Werror]
/in/ex2.c:24:3: note: include '<stdio.h>' or provide a declaration of 'printf'
/in/ex2.c:26:2: error: incompatible implicit declaration of built-in function 'printf' [-Werror]
  printf("\n");
  ^~~~~~
/in/ex2.c:26:2: note: include '<stdio.h>' or provide a declaration of 'printf'
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Lab 6 Exercises
Language
C
Submit At
2022-06-24 17:24:48
Judged At
2022-06-24 17:24:48
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes