and thanks for your time. I apologize in advance I am new to C programming and posting on stack overflow. Any information I may have left out and questions you have please ask.

I have this lab I am working on for my class and I'm having trouble understanding how the dreaded pointers operate. First I will explain the lab instructions.

First, I am to create an array of 200 words with a max length of 30+1 for null.
Next, call functions I need to create which include:

1. A read function which reads words from a file into the array. I must use fopen and fscanf functions.
2. A function to convert a string to lowercase using the ASCII codes of each character. (Must use pointers)
3. A function to return the length of a string.(Can't use strlen function and must use pointers)
4. A function with three parameters(array of words, # of words in array, and an int length). Function returns the number words in the array that match the int length.
5. A print function to print all the words in the array.

The IDE I am using is Dev C++ its been wonky so I have also been using netbeans.
I have only attempted to create the read, print, and converting to lowercase functions. I first tried to read the file and print the array in main. The file I'm reading is created by me it contains a short sentence which follows exactly:

* There ARE so MANY words in HERE

EDIT- Updated main code to current with working lowercase loop inside main.

```cpp
#define rows 200    //How many words allowed in array.
#define cols 31     //How many characters allowed for each word.

void lowercase(char* words, int count);
int read(char (*words)[cols]);
void print(char (*words)[31], int count);

int main(int argc, char *argv[]){
    char words[rows][cols];
    int i, j;   
    int count = read(words);

    print(words, count);
/*
    //make words lowercase
    for(i = 0;i<count;i++){
        for(j = 0;j<cols;j++){
            if(words[i][j]!=0){
                if(words[i][j]<91 && words[i][0]>64)
                    words[i][j] = words[i][j]+32;
            }
        }
    }*/

    for(i = 0;i < count;i++){
        lowercase(*words+i, count);
    }
    print(words, count);

    return 0;
}

```

The code is poorly written and managed properly I'm just trying to get everything to work first then it will be more appropriate. The first printf output comes out how it should:

Array [0]: There

Array [1]: ARE

Array [2]: so

Array [3]: MANY

Array [4]: words

Array [5]: in

Array [6]: HERE

Then the print function I have prints out the words correctly in the array but it includes all 30 spaces for each word instead of just the word. This is how it is written I need to change it.

```cpp
void print(void *array, int SIZE){
    int i,
        j;

    char *charArray = (char *) array;

    for( j = 0; j < SIZE; j++ ){
        for( i = 0; i < SIZE; i ++){
            printf( "%c ", charArray[j*SIZE + i] );
        }
        printf( "\n" );
    }
}

```

The tolower function I created was partially working converting the first letter of each word to lowercase. Now it is broke and do not remember what I have changed.

EDIT- updated lowercase function. The lowercase in main works exactly but with this function it doesn't convert all the words to lowercase it stops at the third word the rest are the same.

```cpp
void lowercase(char *words, int count){
    int j;

    for(j = 0;j<cols;j++){
        if(words[j]!=0){
            if(words[j]<91 && words[j]>64)
                words[j] = words[j]+32;
        }
    }
}

```

I tried to move the read code in main to its own function also trying to mimic the print code with the pointers but when I run the program it stalls and the exe file stopped working window pops up with command prompt.
No errors or warnings in IDE.

```cpp
int read(void *array){
    FILE *file;
    int i,
        j;

    char *words = (char *) array;
    file = fopen("words.txt", "r");
    //STORE IN ARRAY
    for(i=0;i<7;i++)
        fscanf(file,"%s", words[i]);
}

```

If you have not figured out I have no idea when or how to use pointers or addresses. I have been taught basically all of C in literally 12 hours which is in my opinion not enough time to learn the language at all especially understand it efficiently. Any help will be greatly appreciated. Thank You.