Hey I'm really new to programming and having trouble with arrays. Can someone help me with this project. "c programming a modern approach: modify a program that reverses the words of a sentence so that it stores the words in a two dimensional char array as it reads the sentence, with each row of the array storing a single word. assume that the sentence contains no more than 30 words and no word is more than 20 characters long. Be sure to store a null character at the end of each word so that it can be treated as a string"
(also i don't get what its saying about the null character).
here's my try but it's not working. i think i'm close though.

```
#include <stdio.h>

#define MAX_SENTENCE_LEN 80

#define SENTENCE_MAX 30

#define WORD_MAX 20
int main(void)
{
  char ch, sentence[MAX_SENTENCE_LEN] = {' '}, terminator = '.';
  int n, i, j, start, finish;

  printf("Enter a sentence: ");
  for (n = 1; n < MAX_SENTENCE_LEN; n++) {
    ch = getchar();
    if (ch == '.' || ch == '?' || ch == '!') {
      terminator = ch;
      break;
    }
    sentence[n] = ch;
  }

  printf("Reversal of sentence:");
  finish = n;
  for (start = finish - 1; start >= 0; start--) {
    if (sentence[start] == ' ') {
      for (i = start; i < finish; i++)
        putchar(sentence[i]);
      finish = start;
    }
    {

int sentence[SENTENCE_MAX][WORD_MAX];
int word[30][20];
    for (i=0; i< SENTENCE_MAX;i++){
        for (j=0; j<WORD_MAX; j++)
            sentence[i][j]=-1;
            }
}
  }
  printf("%c\n", terminator);

  return 0;}

```

i wrote a new code which i think is closer to what i want but it still won't run. do i have a faulty compiler or what? 
anyway here's the new code 

```
#include<stdio.h>

#define N 100

int main (void)

{
    char sentence[N][N], ch, termChar;
    int i = 0, l = 0, count = 0;
    int j = 0, k, start, finish, word;

    printf("enter a sentence: ");

    while (ch = getchar())
    {
        sentence[i][l++]= ch;
    if (ch == ' ')
        {
            sentence[i][l] = '\0';
            i++;
            l = 0;
            count++;
        }

        if (ch == '.' || ch == '!' || ch == '?')
        { 
                sentence[i][l-1]= ' ';
                sentence[i][l]= '\0';
                termChar = ch;
                count ++;
                break;
        }
    }

    for(i=count ; i>=0; i--)
        printf("%s ", sentence[i]);
    printf("%c\n", termChar);
    return 0; 

    }

```