This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Deep Copy Returning new node (without freeing it) ________________________________________________ Version B Problem 1 1 - a,b,c,d 2 - b 3 - d 4 - a 5 - a,b(,c) Sheet1 Page 2 Problem 2 17 ... 43,44 int left = evaluate(root->left) 45 switch (root->mode) 63 return root->value 79 expr_node *right = parse_expression(lhs, op) 80 expr_node *left = parse_expression(rhs, end) 81 return create_expr_node(*op, 0, right, left) 87 expr_node *root = parse_expression("10-5-5",NULL) 89 delete_expr_node(root) Problem 3 1) Adds the string to the head of the linked list (or stack) 2) a) fun is fun is recursion b) Racecar c) C B A d) 2731SC si taerg Problem 4 Malloc Malloc return != null Shallow Copy Deep Copy Returning new node (without freeing it)...
View Full Document
This note was uploaded on 06/17/2008 for the course CS 1372 taught by Professor Smith during the Fall '07 term at Georgia Institute of Technology.
- Fall '07