The code is ok, but the second column size is not big enough to hold the string, so it should be like
char season[][7] = {"spring","summer","fall","winter"};
Otherwise the you can initialize the string like this and you can print the string like season[0], season[1] etc.,
Regards
Pradeep P
Quote:
quote:Originally posted by ÃÃ
ÃÃ
A few days ago,i wrote a program, here is part of it:
char season[][4]={"spring","summer","fall","winter"};
who can tell me it is right or not?
if it is right,how can i output it?
thanks in advance!:)
|
It is not how much we do,
but how much love we put in the doing.
-Mother Theresa