fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. const int SOME_CONST = 3;
  5. int arr[SOME_CONST];
  6.  
  7. //initialize the first two elements of the array
  8. arr[0] = 1;
  9. arr[1] = 2;
  10.  
  11. //print all elements of array
  12. printf("arr[0]: %d\n", arr[0]);
  13. printf("arr[1]: %d\n", arr[1]);
  14. printf("arr[2]: %d\n", arr[2]);
  15.  
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 4476KB
stdin
Standard input is empty
stdout
arr[0]: 1
arr[1]: 2
arr[2]: 32766