Hello C Board,

This is my first post so I'll start with briefly introducing myself. My name is Bart, I'm 17 years old and live in the Netherlands.
I got into programming 4 days ago and started learning C with "The C Programming Language" by Kernighan and Ritchie. I've plowed through the first chapter and did the final exercise.

The assignment is to write a program that checks code that is put in for rudimentary syntax errors like missing parentheses, braces and brackets. I've tried my best but assume that my program could be improved on both functionality and code.

Code:
#include <stdio.h>
#define MAXINPUT 32766
/* This program checks the input on rudimentary syntax errors.

-Thoughts before coding-

1. Collect the input and store it in array of character type.
2. Check the input character by character.
3. Count number of opening and closing curly brackets ('{}') and see whether they match up or not.
4. If they are not equal, return to the user that he has forgotten a curly bracket.
5. Check the number of opening and closing open brackets ('()') and see whether they match up or not.
6. If they are not equal, return to the user that he has probably forgotten an open backet.
7. Check the number of opening and closing square brackets ('[]') and see whether they match up or not.
8. If they are not equal, return to the user that he has probably forgotten a square backet.
9. Check for single and double quotes and see whether the result of adding those up is an even number.
10. If this is not the case, return to the user that he has probably forgotten a single or double quote.
11. Check whether the amount of times '*' and '/' are used directly after each other is even.
12. If this is not the case, return to the user that he has probably forgotten to close a comment block
*/

int b_getinput(char b_input[], int maxinput); // Declaring fuction
main()
{
    int len; // Holds length of input
    int j; // Used for the loop to check array
    int ccurlo; // Holds amount of times opening curly brackets are used
    int ccurlc; // Holds amount of times closing curly brackets are used
    int copeno; // Holds amount of times opening open brackets are used
    int copenc; // Holds amount of times closing open brackets are used
    int csquareo; // Holds amount of times opening square brackets are used
    int csquarec; // Holds amount of times closing square brackets are used
    int dquote; // Holds amount of times double quotes are used
    int squote; // Holds amount of times single quotes are used
    int bcom; // Holds amount of times '*' and '/' are used subsequently

    char input[MAXINPUT] = {0}; // Holds current input

    j = ccurlc = ccurlo = copenc = copeno = csquarec = csquareo = dquote = squote = bcom = 0; // Set all integers to 0

    len = b_getinput(input, MAXINPUT); // Get value for len

    if (len > 0) // If there is input
        printf("\n The code you put in was:\n\n%s\nPOSSIBLE ERRORS: \n\n", input); // Print the code that was put in

    for (j = 0; j <= len; j++) // Loop for as long as j <= len
        {
            if (input[j] == '{') {
                ++ccurlo;
            }
            else if (input[j] == '}') {
                ++ccurlc;
            }
            else if (input[j] == '(') {
                ++copeno;
            }
            else if (input[j] == ')') {
                ++copenc;
            }
            else if (input[j] == '[') {
                ++csquareo;
            }
            else if (input[j] == ']') {
                ++csquarec;
            }
            else if (input[j] == '"') {
                ++dquote;
            }
            else if (input[j] == '\'') {
                ++squote;
            }
            else if (input[j] == '*') {
                if (input[j+1] == '/') {
                    ++bcom;
                }
            }

        }
    if (ccurlc != ccurlo) {
        printf ("The amount of opening curled brackets is not equal to the amount of closing curled brackets, check to see if you have forgotten to put '{' or '}' somewehere. \n\n");
    }
    if (copenc != copeno) {
        printf ("The amount of opening open brackets is not equal to the amount of closing open brackets, check to see if you have forgotten to put '(' or ')' somewehere. \n\n");
    }
    if (csquarec != csquareo) {
        printf ("The amount of opening square brackets is not equal to the amount of closing square brackets, check to see if you have forgotten to put '[' or ']' somewehere. \n\n");
    }
    if ((dquote % 2)!= 0) {
        printf ("The amount of double quotes you used is not an even number, check to see if you have forgotten to place a double quote somewhere.\n\n");
    }
    if ((squote % 2)!= 0) {
        printf ("The amount of single quotes you used is not an even number, check to see if you have forgotten to place a single quote somewhere.\n\n");
    }
    if ((bcom % 2)!= 0) {
        printf ("The amount of times you used */ is not an even number, check if you forgot to close a block of comments.\n\n");
    }
    return 0;
}

b_getinput(char s[], int lim)
{
    int c, i;

    for (i = 0; i < lim-1 && (c=getchar())!=EOF; ++i) // Create loop to run for as long as the amount of characters put in does not exceed the limit and EOF is not put in.
        s[i] = c; // Assign the value of c to place i in the array.
    if (c == '\0') {
        s[i] = c;
        ++i;
    }
    s[i] = '\0';
    return i;
}
It'd be very much appreciated if someone could take a look at the code and help me improve it.

Thanks in advance,
Bart