c isn't necessary at all, or another way to think about it is c is always whatever is on top of the stack.

Algorithm:

1. For each character in the string
a. If it's an open character, push it...