fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. int i,arr[i],sum=0;
  6. for(i=0;arr[i]==999;i++)
  7. {
  8. scanf("%d",arr[i]);
  9. sum = sum + arr[i];
  10. }
  11.  
  12. printf("Av= %d",sum/i(float));
  13.  
  14.  
  15. return 0;
  16. }
  17.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function 'main':
prog.c:8:9: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
   scanf("%d",arr[i]);
         ^
prog.c:12:24: error: expected expression before 'float'
  printf("Av= %d",sum/i(float));
                        ^
prog.c:12:22: error: called object 'i' is not a function or function pointer
  printf("Av= %d",sum/i(float));
                      ^
prog.c:5:6: note: declared here
  int i,arr[i],sum=0;
      ^
stdout
Standard output is empty