fork download
  1. #include <stdio.h>
  2.  
  3. void function_a(int return_array[const], size_t sz) {
  4. return_array[0] = 1;
  5. return_array[1] = 0;
  6. }
  7.  
  8.  
  9. int main(void) {
  10. int myarray[2];
  11. function_a(myarray, 2);
  12.  
  13. for(int i=0; i<2; ++i)
  14. {
  15. printf("[%d] : %d\n", i, myarray[i]);
  16. }
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 5464KB
stdin
Standard input is empty
stdout
[0] : 1
[1] : 0