diff --git a/education/software development/ECE1400/Chapter 9 Exercises.md b/education/software development/ECE1400/Chapter 9 Exercises.md index cb7e302..ebc3876 100644 --- a/education/software development/ECE1400/Chapter 9 Exercises.md +++ b/education/software development/ECE1400/Chapter 9 Exercises.md @@ -46,4 +46,22 @@ All of them are legal and will compile and run. (c) and (d) are what I would con Answer: (a) and (b). -Parameters must contain a type annotation but theyd o \ No newline at end of file +Parameters must contain a type annotation but they do not need to specify a name. A function prototype declaration must specify a return type. + +> 9. What will be the output of the following program? +```c +double triangle_area(double base, double height) +{ + double product; + product = base * height; + return product / 2; +} +double triangle_area(double base, double height) +{ + double product; + product = base * height; + return product / 2; +} + +``` +