Thread: Right or wrong?
View Single Post
  #6 (permalink)  
Old February 24th, 2004, 02:58 PM
pradeep_itguy pradeep_itguy is offline
Friend of Wrox
 
Join Date: Feb 2004
Posts: 177
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote