This is really easy:
int eval(tree) {
if tree is just a number return that number
else {
l = eval(tree.left)
r = eval(tree.right)
return result of operation on l and r
}
}
Likewise, for the printing. Prefix means, you first print the operaor, then the left subtree, then the right subtree. Postfix would mean: first the left subtree, then the right subtree, then the operator.
Only infix is a bit more complicated, because you perhaps need to print the subtress in parentheses.