how array month in c
#include "stdio.h"
#include "conio.h"
main ()
{
char month [12] = ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
printf("Month 1 : %c",month[0]);
printf("Month 2 : %c",month[1]);
printf("Month 3 : %c",month[2]);
printf("Month 4 : %c",month[3]);
printf("Month 5 : %c",month[4]);
printf("Month 6 : %c",month[5]);
printf("Month 7 : %c",month[6]);
printf("Month 8 : %c",month[7]);
printf("Month 9 : %c",month[8]);
printf("Month 10 : %c",month[9]);
printf("Month 11 : %c",month[10]);
printf("Month 12 : %c",month[11]);
getch ();
}
it error [Error] array must be initialized with a brace-enclosed initializer
Last edited on
Sorry but I dont understand your question. Could you please elaborate?
i have to use functions array by month Januarry-December
: then answer
month 1 : January
month 2 : February
month 3 : March
month 4 : April
month 5 : May
month 6 : June
month 7 : july
month 8 : Agust
month 9 : September
month 10 :October
month 11 :November
month 12 : December
help me please!!