配列すべてマクロ作って、
#define A(index) if( index > sizeof(a) ) printf("a error (%d,%d)",index,__LINE__); a[index]
で、デバッグとか? ゲロゲロコードだろ? やめとけ。