as I know, “push” and “pop” are assembler-commands.
To solve this problem I recommend recursion.
I don’t know if you know what this is, so I’ll explain it shortly:
Recursion is when a function calls itself. So for each call in a call the local variables of the function are pushed on the stack. When the function ends, the variables are removed from the stack.
So you could write a function which is called when the beginning-tag starts. And for each further beginning-tag it calls itself.
In c you will need the string-functions in like strcmp, strncmp, … to compare the actual string-strip with “<" or ""
I think the solution in C cannot be done by a “beginner”. You should know about arrays, pointers, string-functions, etc.
When do you need the coding (deadline) ?