8-puzzle - Functions not working correctly

AWOL:
for (a=3;a>0;a--){A three element array has no element with the subscription 3

Tried changing it to 2, but the matrix turned out wrong.

bbb
bb1
b23

Even though you're correct about there being no array address of 3, I guess that part was accidentally right anyway.