Yes, it does. All remaining values will be left at 0. Of course you would have to explicitly specify the size of the array, or the compiler would not know that there are remaining elements.
E.g. part of the Shokidoki source:
Code: Select all
// Multi-purpose table of about 9KB, for holding all kernel data
unsigned char tables[(39*13+5)*18+7] = {
#define shadow (tables + 9)
0, 0, 0, 0, 0, 0, 0, 0, 0, 18,21,22,23,24,23,22,21,18, // 0: 12x18 empty-square PST + shadow board (216 bytes)
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,19, 0, 0, 0, 0, 0,20, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 17,17,17,17,17,17,17,17,17,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 33,33,33,33,33,33,33,33,33,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,36, 0, 0, 0, 0, 0,35, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 34,37,38,39,40,39,38,37,34,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,17,18,19,20,21,22,23,
0, 0, 0, 0, 0, 0, 0, 0, 0, 33,34,35,36,37,38,39, 0, 0,
#define board (tables + 14*18+1)
#define holdings (tables + 24*18+2)
// board (11x18 mailbox with 1-wide guard band)
48,48,48,48,48,48,48,48,48,48,48, 0,0,0,0,0,0,0, // 216: 14x18 game board + holdings (224 bytes)
48,48,48,48,48,48,48,48,48,48,48, 0,0,0,0,0,0,0, // 253: board corner
48,18,21,22,23,24,23,22,21,18,48, 0,0,0,0,0,0,0,
48, 0,19, 0, 0, 0, 0, 0,20, 0,48, 0,0,0,0,0,0,0,
48,17,17,17,17,17,17,17,17,17,48, 0,0,0,0,0,0,0,
48, 0, 0, 0, 0, 0, 0, 0, 0, 0,48, 0,0,0,0,0,0,0,
48, 0, 0, 0, 0, 0, 0, 0, 0, 0,48, 0,0,0,0,0,0,0,
48, 0, 0, 0, 0, 0, 0, 0, 0, 0,48, 0,0,0,0,0,0,0,
48,33,33,33,33,33,33,33,33,33,48, 0,0,0,0,0,0,0,
48, 0,36, 0, 0, 0, 0, 0,35, 0,48, 0,0,0,0,0,0,0,
48,34,37,38,39,40,39,38,37,34,48, 0,0,0,0,0,0,0,
48,48,48,48,48,48,48,48,48,48,48, 0,0,0,0,0,0,0, // 401: holding[EMPTY]
48,48,48, 0, 0, 0, 0, 0, 0, 0,48, 0,0,0,0,0,0,0,
48, 0, 0, 0, 0, 0, 0, 0,48,48,48, 0,0,0,0,0,0,0,
#define prev (tables + 468)
#define next (tables + 477)
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 450: 12x18 piece-list links (not used yet)
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
#define captCode (tables + 684 + 152)
B, 0, 0, 0, 0, 0, 0, 0,130, 0, 0, 0, 0, 0, 0, 0, B, 0, // 666: 17x18 capture codes (306 bytes)
0, B, 0, 0, 0, 0, 0, 0,130, 0, 0, 0, 0, 0, 0, B, 0, 0, // bits 0-6 indicate various directions
0, 0, B, 0, 0, 0, 0, 0,130, 0, 0, 0, 0, 0, B, 0, 0, 0, // bit 7 indicates distant
0, 0, 0, B, 0, 0, 0, 0,130, 0, 0, 0, 0, B, 0, 0, 0, 0,
0, 0, 0, 0, B, 0, 0, 0,130, 0, 0, 0, B, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, B, 0, 0,130, 0, 0, B, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, B,32,130,32, B, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 8, 2, 8, 0, 0, 0, 0, 0, 0, 0, 0,
R, R, R, R, R, R, R,64, 0, 64, R, R, R, R, R, R, R, 0,
0, 0, 0, 0, 0, 0, 0, 4, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, F,16,129,16, F, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, F, 0, 0,129, 0, 0, F, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, F, 0, 0, 0,129, 0, 0, 0, F, 0, 0, 0, 0, 0,
0, 0, 0, F, 0, 0, 0, 0,129, 0, 0, 0, 0, F, 0, 0, 0, 0,
0, 0, F, 0, 0, 0, 0, 0,129, 0, 0, 0, 0, 0, F, 0, 0, 0,
0, F, 0, 0, 0, 0, 0, 0,129, 0, 0, 0, 0, 0, 0, F, 0, 0,
F, 0, 0, 0, 0, 0, 0, 0,129, 0, 0, 0, 0, 0, 0, 0, F, 0,
#define deltaVec ((signed char *)tables + 990 + 152)
-19,0, 0, 0, 0, 0, 0, 0,-18, 0, 0, 0, 0, 0, 0, 0,-17, 0, // 972: capture vectors (306)
0,-19,0, 0, 0, 0, 0, 0,-18, 0, 0, 0, 0, 0, 0,-17,0, 0,
0, 0,-19,0, 0, 0, 0, 0,-18, 0, 0, 0, 0, 0,-17,0, 0, 0,
0, 0, 0,-19,0, 0, 0, 0,-18, 0, 0, 0, 0,-17,0, 0, 0, 0,
0, 0, 0, 0,-19,0, 0, 0,-18, 0, 0, 0,-17,0, 0, 0, 0, 0,
0, 0, 0, 0, 0,-19,0, 0,-18, 0, 0,-17,0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,-19,0,-18, 0,-17,0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,0,-19,-18,-17,0, 0, 0, 0, 0, 0, 0, 0,
-1,-1,-1,-1,-1,-1,-1,-1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0,
0, 0, 0, 0, 0, 0, 0,17, 18,19, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,17, 0, 18, 0,19, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,17, 0, 0, 18, 0, 0,19, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0,17, 0, 0, 0, 18, 0, 0, 0,19, 0, 0, 0, 0, 0,
0, 0, 0,17, 0, 0, 0, 0, 18, 0, 0, 0, 0,19, 0, 0, 0, 0,
0, 0,17, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0,19, 0, 0, 0,
0,17, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0,19, 0, 0,
17, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0,19, 0,
#define dist ((signed char *)tables + 1296 + 152)
8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, // 1278 = 71*18: distance (306)
0, 7, 0, 0, 0,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x3D,0x4D,0x5D,0x6D,0x7D,0x8D, // 4 MSB contain file nr, 4 LSB promotion flag
0x00,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x80, 0x0D,0x1D,0x2D,0x3D,0x4D,0x5D,0x6D,0x7D,0x8D, // promotions are encoded as off-board squares,
0x00,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x80, 0x09,0x19,0x29,0x39,0x49,0x59,0x69,0x79,0x89, // 9 higher than the real to-square
0x00,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x80, 0x09,0x19,0x29,0x39,0x49,0x59,0x69,0x79,0x89,
0x00,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x80, 0x09,0x19,0x29,0x39,0x49,0x59,0x69,0x79,0x89,
0x00,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x80, 0x0B,0x1B,0x2B,0x3B,0x4B,0x5B,0x6B,0x7B,0x8B,
0x04,0x14,0x24,0x34,0x44,0x54,0x64,0x74,0x84, 0x0B,0x1B,0x2B,0x3B,0x4B,0x5B,0x6B,0x7B,0x8B,
0x02,0x12,0x22,0x32,0x42,0x52,0x62,0x72,0x82, 0x0B,0x1B,0x2B,0x3B,0x4B,0x5B,0x6B,0x7B,0x8B,
#define steps ((signed char *)tables + 98*18)
17,19,18,1,-1, -18,0, // 1764 = 98*18 = 0x6D2: move-generator steps table. 0 = wG, 5 = bP
35,37,0, // 7 = wN
17,-17,19,-19, 18,-18,1,-1,0, // 10 = +R, 14 = R
18,0, // 19 = wL
-18,0, // 21 = bL
19,17,-19,-17,0, // 23 = B
0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 28 (unused slider space, has 32-bit set)
19,17,-19,-17, 1,-1,18,-18,0, // 42 = +B
-35,-37,0, // 51 = bN
1,-1,-18, 18,17,19,-17,-19,0, // 54 = K, 57 = wS
-18,-17,-19,17,19,0, // 63 = bS
-17,-19,-18,1,-1, 18,0, // 69 = bG, 74 = wP
#define firstDir (tables + 98*18 + 76 - 16)
0, 74, 19, 23, 14, 7, 57, 0, 54, 0, 0, 42, 10, 0, 0, 0, // indexed by piece type
0, 5, 21, 23, 14, 51, 63, 69, 54, 69, 69, 42, 10, 69, 69, 0,
6,
// capture codes
#define nearCode (tables + 104*18 - 16 + 1)
#define farCode (tables + 106*18 - 16 + 1)
#define promoFlag (tables + 108*18 - 16 + 1)
// contact directions
0, 1, 1, BISHOP, ROOK, 16, 1|4|8, WGOLD, KING, WGOLD, WGOLD, KING, KING, WGOLD, WGOLD, 0, // 8*13*18 = 104*18
0, 2, 2, BISHOP, ROOK, 32, 2|4|8, BGOLD, KING, BGOLD, BGOLD, KING, KING, BGOLD, BGOLD, 0,
0, 0, 0, 0,
// distant directions
0, 0, 1, BISHOP, ROOK, 0, 0, 0, 0, 0, 0, BISHOP, ROOK, 0, 0, 0,
0, 0, 2, BISHOP, ROOK, 0, 0, 0, 0, 0, 0, BISHOP, ROOK, 0, 0, 0,
0, 0, 0, 0, // edge guard!
// promotion flags (16 = white zone, 32 = black, 2 = last rank forced promotion, 4 = forelast)
0, 16+2, 16+2, 16, 16, 16+6, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 32+2, 32+2, 32, 32, 32+6, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0,
// Piece-Square tables for pieces: white .PNBRLSGK + promoted PNBRLS. , then black
#define PST (tables)
/* wP */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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