fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. int a,b;
  6. int x[10]={0,0,0,0,0,0,0,0,0,0};
  7.  
  8. scanf("%d",&a);
  9. scanf("%d",&b);
  10.  
  11. int *p=x;
  12. p[0]=a;
  13. p[5]=b;
  14.  
  15. for(int i=0;i<10;i++){
  16. printf("%d ",p[i]);
  17. }
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 5420KB
stdin
1
2
stdout
1 0 0 0 0 2 0 0 0 0