Bonus Marks
- › Write a recursive function to compute the number of leaves of a tree.
- › Write a recursive function to compute the number of branches of a tree.
- › Write a recursive function to compute the most number of children spanning from one branch of a tree.
- › How would you use
strstr
to see if a node was tagged as anexpr
? - › How would you use
strcmp
to see if a node had the contents'('
or')'
? - › Add the operator
%
, which returns the remainder of division. For example% 10 6
is4
. - › Add the operator
^
, which raises one number to another. For example^ 4 2
is16
. - › Add the function
min
, which returns the smallest number. For examplemin 1 5 3
is1
. - › Add the function
max
, which returns the biggest number. For examplemax 1 5 3
is5
. - › Change the minus operator
-
so that when it receives one argument it negates it.
当前内容版权归 orangeduck 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 orangeduck .