File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ #include<stdio.h>
2
+ #include<stdlib.h>
3
+ int main()
4
+ {
5
+ int list[5];
6
+ int *plist[5];
7
+
8
+ list[0] = 10;
9
+ list[1] = 11;
10
+
11
+ plist[0] = (int*)malloc(sizeof(int)); // plist[0]에다가 int형 크기 많큼 동적할당 해준다.
12
+
13
+ printf("list[0] \t=%d\n",list[0]); // list[0]의 값을 출력한다.
14
+ printf("address of list \t= %p\n", list); // list의 주소를 출력한다.
15
+ printf("address of list[0] \t = %p\n",&list[0]); // list[0]의 주소를 출력한다.
16
+ printf("address of list + 0 \t= %p\n",list+0); // list + 0 의 주소를 출력한다.
17
+ printf("address of list + 1 \t= %p\n",list+1); // list + 1 의 주소를 출력한다.
18
+ printf("address of list + 2 \t= %p\n",list+2); // list + 2 의 주소를 출력한다.
19
+ printf("address of list + 3 \t= %p\n",list+3); // list + 3 의 주소를 출력한다.
20
+ printf("address of list + 4 \t= %p\n",list+4); // list + 4 의 주소를 출력한다.
21
+ printf("address of list[4] \t= %p\n ",&list[4]); // list [4] 의 주소를 출력한다.
22
+
23
+ printf("--------------------------------------------------------------------------\n\n");
24
+
25
+ printf("[----- [김 윤 희] [2018038014] -----]\n\n");
26
+
27
+
28
+ }
You can’t perform that action at this time.
0 commit comments