From 11026292fdd099019f296d9a9eb5819730bb2025 Mon Sep 17 00:00:00 2001 From: zleyyij <75810274+zleyyij@users.noreply.github.com> Date: Sat, 12 Oct 2024 20:57:02 -0600 Subject: [PATCH] vault backup: 2024-10-12 20:57:02 --- .../ECE1400/Chapter 9 Exercises.md | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) 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; +} + +``` +