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