Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

doitfgts

Name: Anonymous 2011-03-19 2:25

Write a function in C that gets passed a pointer to a null-terminated string containing an arithmetic expression such as "3*(4+5)-1" and returns the correct value.  It must be able to handle +,-,*,/, and parenthesis.  No implied multiplication, no negative numbers, usual order of operations, and the passed string is guaranteed to have matched parenthesis and proper syntax.

Name: Anonymous 2011-03-19 7:52

>>7
You mean this one?

http://clc-wiki.net/wiki/K%26R2_solutions:Chapter_5:Exercise_10

That's for polish notation, much simpler.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List