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