This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: in its standardized tree? (If it exists in both cases) 4. Problem 4 (20 Points) Can you write a macro in standard C that `returns' the greatest common divisor of a pair of arguments, without calling a subroutine? Why or why not? [textbook 3rd edition, problem 3.22] 5. Problem 5 (20 Points) In Section 3.5.4 we noted that while a single min function in C would work for both integer and floating-point numbers, overloading would be more efficient, because it would avoid the cost of type conversions. Give an example in which overloading does not seem advantageous--one in which it makes more sense to have a single function with floating-point parameters, and perform coercion when integers are supplied. [textbook 3rd edition, problem 3.20]...
View Full Document
- Fall '08
- Greatest common divisor, RPAL, standardized tree, Programming Language Principles