Question: 1. (A through D) Write a function prototype in c for each of the following (note: you do not have to write the code that
1. (A through D) Write a function prototype in c for each of the following (note: you do not have to write the code that implements these functions). Also, show how to call these functions and print the result (it may be desirable to use a variable to store results from functions that return values).
For example:
A function getPI which does not accept any inputs and returns the constant Pi as a double number.
Prototype:
double getPi(void);
Function call/usage:
double x;
x = getPi();
printf("%lf", x);
A. A function systemError which does not accept any parameters or return any values.
B. A function getMax which finds the maximum value of three integers.
C. A function getArea which calculates the area of a triangle given the base and height. The input arguments are type double.
D. A function printChar that accepts and prints a character on the screen. This function accepts a char input parameter and does not return a value.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
