I expected the size of the following array initialization to be 32. 1 byte characters, 2 bytes for each item in the list, 16 items....= 32. However it is 128 bytes. Why?
char* cmds[] = {"AQ", "BD", "LS", "TW", "AS", "CP", "TR", "CO", "BF", "MS", "SR", "TL", "WT", "PM", "TE", "TC"};
printf("%li\n", sizeof(cmds));
//result is 128
//size of list is 16
//8 bytes per item in the list
//why?
"AQ"is a three-byte literal.char cmds[][3] = { ... };would fix the issue.