Here is the instruction to the assignment: http://dl.dropbox.com/u/43732846/Instruction.txt
I think I got up to the part to initialize array and set length to 0 but I'm not sure how to do a for loop to print.
I tried like strlen(month), printf(month), etc, but none of them seems to work.
And is it supposed to be 'length int' under word_length structure? Or is this a mistake since int is a data type and cannot be used as a variable??
Could you help me out?
Thanks!
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MONTHS 12
#define LENGTH 1
struct word_length {
char *word;
int count;
} month[] = {
{ "January", 0 },
{ "February", 0 },
{ "March", 0 },
{ "April", 0 },
{ "May", 0 },
{ "June", 0 },
{ "July", 0 },
{ "August", 0 },
{ "September", 0 },
{ "October", 0 },
{ "November", 0 },
{ "December", 0 }
} ;
int main() {
int i = 0;
for (i = 0; i < 12; i++) {
strlen(words);
}
printf("\n\n\nPress any key to continue.");
getchar(); getchar();
exit(0);
}