Array indices start at 0. The empty string at index 0 just offsets the number that the month corresponds with, to match how we actually use dates (1 = January, 2 = February, etc.)
@soulworld05,
Yes, Ganado read it right. Sometimes the fact that C/C++ array indices start at 0 is inconvenient, for example for months of the year, ... or pay-day.
The 0th element won't be used, but it is not costly to ensure that array index corresponds directly to the conventional calendar month. Sometimes I make the intention more obvious by writing the array size as
Thanks, everybody. Andy, I have a lecture on switches today. I studied if/else if statements and practiced a lot of programs and still have many to do(I am getting these programs from random websites). I am really in love with programming. I will practice on switches from today too. Thanks for your advice.
Also, can you upload a link here for strings in detail? Like, how to set range in strings etc.