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)

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 < 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");