Find frequency of occurrence of a character - C

C program to read string and count total number of "I" or "i" in that string.

Solution:

#include <stdio.h>
int main()
{
    char s[1000];
    int c=0,j;
    printf("Enter String: ");
    gets(s);
    for(j = 0; s[j] != '\0'; j++)
    {
        if(s[j]=='i' || s[j]=='I')
        c++;
    }
    printf("\nNumber of I/i in String = %d", c);
    return 0;
}


Output:

count i