It is just a code snippet to explain things to you. In your real code you would declare your variables according to your needs and judgements. It is very much possible that the snippet they have put there was a part of a larger program and they have just copied the relevent parts as it is without any changes.