In P.R.China Mainland, citizens will all get their own ID number when they register their birth. The ID number is a string which includes 18 numerical characters(the last of it might be the Roman number X for 10, or ten).
The National Standard of it is GB 11643-1999 (GB is the abbreviation of GuoBiao, which stands for National Standard in Chinese.) For detailed info, reach here.
This project is a small one writen in C(C99 Standard), which could calculate the ID number's Correctness.