1s. using id 410 works, but changing it to 010 will not print out 8 instead
Similarly, 020 becomes 16
How does it become octal?
*/
I have checked your implementation of the append_child function (its signature is: TreeNode append_child(TreeNode tree_node, int child_response_code, enum node_colour colour)). If you pass "010", C treats it as an octal number and hence its decimal value is 8. Similarly 020 -> 16, 030 -> 24 and so on. I think you just need to pass decimal numbers and it should be fine.
Hi @Alan32Liu
Last week you asked the following question
/* TOASK:
I have checked your implementation of the append_child function (its signature is: TreeNode append_child(TreeNode tree_node, int child_response_code, enum node_colour colour)). If you pass "010", C treats it as an octal number and hence its decimal value is 8. Similarly 020 -> 16, 030 -> 24 and so on. I think you just need to pass decimal numbers and it should be fine.