fork(3) download
  1. #include<stdio.h>
  2.  
  3. int (*func())[3]{
  4. static int a[]={1,2,3};
  5. return &a;
  6. }
  7. int main(){
  8. int i=0;
  9. int(*p)[3] = func();
  10. for(i=0; i<3; i++)
  11. printf(" %d\n", (*p)[i]);
  12. return 0;
  13. }
Success #stdin #stdout 0s 1832KB
stdin
Standard input is empty
stdout
 1
 2
 3