You can use two-dimensional arrays to track the locations of the all of the snake's body parts, saying you have a part at {1,1} and another part at {1,2} and the next part at {1,3} and a tail at {2,3}.
So you would just fill your two-dimensional array with 1s and 0s; 1 meaning snake body, 0 meaning no snake body.
Like this: