fork download
  1. #include <stdio.h>
  2.  
  3. void changeA(int array[ ]){
  4.  
  5. array[0]++;
  6.  
  7. }
  8.  
  9. void changeB(int a[ ]){
  10.  
  11. array[0]++;
  12.  
  13. }
  14.  
  15. void changeC(int array){
  16.  
  17. array[2]++;
  18.  
  19. }
  20.  
  21. main(){
  22.  
  23. int array[10] = {2};
  24.  
  25. changeA(array);
  26.  
  27. changeB(array);
  28.  
  29. changeC(array[0]);
  30.  
  31. // What is the value of array[0] at this line of the code. That number is stored in the array at element zero.
  32.  
  33. }
  34.  
  35.  
  36. }
  37.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘changeB’:
prog.c:12:10: error: ‘array’ undeclared (first use in this function)
          array[0]++;
          ^~~~~
prog.c:12:10: note: each undeclared identifier is reported only once for each function it appears in
prog.c: In function ‘changeC’:
prog.c:18:14: error: subscripted value is neither array nor pointer nor vector
         array[2]++;
              ^
prog.c: In function ‘main’:
prog.c:22:7: error: expected ‘;’ before ‘{’ token
 main(){
       ^
At top level:
prog.c:16:6: warning: ‘changeC’ defined but not used [-Wunused-function]
 void changeC(int array){
      ^~~~~~~
prog.c:10:6: warning: ‘changeB’ defined but not used [-Wunused-function]
 void changeB(int a[ ]){
      ^~~~~~~
prog.c:4:6: warning: ‘changeA’ defined but not used [-Wunused-function]
 void changeA(int array[ ]){
      ^~~~~~~
stdout
Standard output is empty