0139-ptr_ary.c - scc - simple c99 compiler
(HTM) git clone git://git.simple-cc.org/scc
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
0139-ptr_ary.c (240B)
---
1 int
2 main()
3 {
4 char arr[2][4], (*p)[4], *q;
5 int v[4];
6
7 p = arr;
8 q = &arr[1][3];
9 arr[1][3] = 2;
10 v[0] = 2;
11
12 if (arr[1][3] != 2)
13 return 1;
14 if (p[1][3] != 2)
15 return 2;
16 if (*q != 2)
17 return 3;
18 if (*v != 2)
19 return 4;
20
21 return 0;
22 }