China Naming Network - Ziwei Dou Shu - Why can't I pass OJ for this code?

Why can't I pass OJ for this code?

There is something wrong with the code in the red box in the picture, which needs to be updated. The title should not exceed 1000. It is possible that his test data is only 1000, and the num array needs to be defined as char num[ 100 1]. Similarly, 0-9 has 10 bit, and you only defined 9 bits, int digit [10];