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