The simplest way is to create your own stack, and parse the data. Your stack is simply an array and an index which says "next free location"
Look at each character as you remove it from the data, and:
If it is a opening bracket, add it to your stack then increment the index.
If it's a closing bracket, remove the item at the top of the stack (by reducing the index and looking at the item on it) and check it's the same type: '(' for ')', '{' for '}' and so on.
Otherwise, ignore it.
When you get to the end of the data, if the index is zero, then any brackets in the input match up.
The advanced version might allow for brackets within C strings and character definitions
"The close bracket character is ')' while the open bracket is '('."
for example. I don't know if that is required for your homework though!