String Array troubles

I'm trying to print the month's abbreviation without much luck. Specifically, it prints only the last character of the array element. Very strange.

char month[13] ={'xxx','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'};
.
.
Serial.print(month[4]); // this will print a single r character

any help will be appreciated ...

You can't store a string of characters in each element of a character array.

You can get what you want by storing an array of character pointers instead:

char *month[] ={"xxx","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"};

Great answer! Thanks!

Good answer thank you I tried it and it worked well