Browse Source

增加数组处理

master
ZEEKLING 4 months ago
parent
commit
68630dc53e
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      c_expert/chapter3/test_array.c

+ 12
- 0
c_expert/chapter3/test_array.c View File

@ -0,0 +1,12 @@
#include <stdio.h>
int main(){
int a[10];
for (int i = 0;i < 10;i ++){
*(a + i) = i;
}
for (int i = 0; i < 10; i++){
printf("a[%d] = %d\n", i, *(a+i));
}
return 0;
}

Loading…
Cancel
Save