6_5_02_pointer_index_offset_table.c (554B)
1 int test_main(void) { 2 unsigned char table[274] = {0}; 3 table[256] = 1; 4 table[259] = 1; 5 table[260] = 1; 6 table[263] = 1; 7 table[265] = 1; 8 table[267] = 1; 9 table[268] = 1; 10 table[270] = 1; 11 table[273] = 1; 12 const unsigned char* lt = &table[256 - 53]; 13 const unsigned char* eq = &table[256 + 6 - 53]; 14 const unsigned char* gt = &table[256 + 12 - 53]; 15 if (lt[53] != 1) return 1; 16 if (eq[53] != 0) return 2; 17 if (gt[53] != 1) return 3; 18 if (lt[54] != 0) return 4; 19 if (eq[54] != 1) return 5; 20 if (gt[54] != 0) return 6; 21 return 42; 22 }