I am working on a program that takes a mathematical expression, transforms it to posfix notation and then solves it.
First I am checking the expression to see if it is well formed ( Open brackets and parenthesis matches the closing ones ). To do the part of checking I used fgets()
to get the string, because it ignores white spaces as far as I know.
Now I have to break the string when a white space shows up, but for this part would be easier to use a do while using the buffer of a scanf( "%s" ,...)
Is there any way that I can use the scanf trick to break the string, work on int part by part without reading it again?