I'll tell you how to use strtok for this, but it probably isn't the tool you need to use. It is a problem that once strtok parses the expression, the operators will be overwritten, and you won't know what to do with the terms.
Code:
char *strtok(char *str, const char *delim);
If str is the expression, delim should contain all the characters which make terms. "+-/*" for example.
So you call:
Code:
/* expression is a string which has "12x^4+6x^2+2x^1+1" in it. */
term = strtok(expression, "+-/*");
/* term is assigned "12x^4" which is part of expression. expression has been edited like so: "12x^4\06x^2+2x^1+1". */
You need to read this page. I also recommend reading this page for an alternative.