vault backup: 2024-10-12 20:57:02
This commit is contained in:
parent
bee5599cc3
commit
11026292fd
@ -46,4 +46,22 @@ All of them are legal and will compile and run. (c) and (d) are what I would con
|
|||||||
|
|
||||||
Answer:
|
Answer:
|
||||||
(a) and (b).
|
(a) and (b).
|
||||||
Parameters must contain a type annotation but theyd o
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user