Is a string a bit string New to the C language. Which design mistakes have I made in my first C program? Or what can I improve? Any little detail is appreciated.

Note: I have experience in multiple coding languages. (this is the beginning of my C journey) 

Description of the program: checks if a string/array of characters is a bit string. Example: "010100" -> valid.

#include &lt;stdio.h&gt;
#include &lt;string.h&gt;

int main() {
    char str[100];
    fgets(str, 100, stdin);

    int len = strlen(str);
    int len2 = len - 1;
    int count = 0;

    //loop through string
    for(int i = 0; i &lt; len2; i++) {
        switch (str[i]) {
            case '0':
            case '1':
                count++;
                break;
        }
    }

    //is string a bit string
    if (count == len2) 
        printf("Valid!\n");
    else
        printf("Not Valid...\n");

    return 0;
}
Ultimately, you are looking to see if any character is not either '0' or '1'.  The moment you find such a character, you can break the loop immediately: 

int isBitString = 1;
for(int i = 0; i &lt; len2; i++) {
    if (str[i] != '0' &amp;&amp; str[i] != '1') {
        isBitString = 0;
        break;
    }
}