snake code for C