I would like to know how char [] work in C. In my program am trying to find the total number of occurrences of each character given a sentence.

```
int main(void)
{
char sampleInput[] = "Long long nights await ahead";
int n, i, g, h, t, s;
int lengthOfArr = (sizeof(sampleInput)/sizeof(sampleInput[0]));

for(int i = 0; i < lengthOfArr; i++)
{
    if(sampleInput[i] == 'N'|| sampleInput[i] == 'n'){
        n++;
    }
    if(sampleInput[i] == 'I'|| sampleInput[i] == 'i'){
        i++;
    }
    if(sampleInput[i] == 'G'|| sampleInput[i] == 'g'){
        g++;
    }
    if(sampleInput[i] == 'H'|| sampleInput[i] == 'h'){
        h++;
    }
    if(sampleInput[i] == 'T'|| sampleInput[i] == 't'){
        t++;
    }
    if(sampleInput[i] == 'S'|| sampleInput[i] == 's'){
        s++;
    }
}
printf( "N: %d\nI: %d\nG: %d\nH: %d\nT: %d\nS: %d\n", n,i,g,h,t,s);
}

```

I should be able to display the total number of occurrences for each letter. 
However, the output I get are random values.
N: 4194435 I: 1974890477 G: 3604483 H: 2 T: 4201490 S: 4201596