I have a section of code in which two array are declared with sizes of 6 and 13, but when \'sizeof()\' is used the lengths are returned as 12 and 26.
#includ
The sizeof operator is measured in units such that an unsigned char is 1 unit.
On your platform, short is twice as large as char, thus the results you're seeing.
To properly determine array length, you could use a macro such as:
#define ARRAY_LEN(ary) (sizeof (ary) / sizeof (ary[0]))