Function calls in c
In c/c ++, a function is an essential part of a program. Each program must have a primary function. You can also compile the required functions as needed to implement various functions. Question 1. Use a function to output the largest program in two numbers. # Include <stdio. h> int max (int a, int B) {int z; z = a> B? A: B; return (z) ;}int main () {int a, B, c; scanf ("% d", & a, & B ); c = max (a, B); printf ("% d", c); return 0;} input: 3 8 output: 8. If the type of the function value is different from the type of the expression in the return statement, the function type determines the type of the return value. For numeric data, the value can be automatically converted. For example, in question 1, if the max functions a, B, and z are changed to float, the return Statement should return the value of z as float. Question 2. Use the function to output the maximum value among the three numbers. # Include <stdio. h> int main () {int max (int a, int B, int c); int a = 21, B = 10, c = 1; printf ("Maximum Number: % d ", a); return (0);} int max (int a, int B, int c) {if (B> a) a = B; if (c> a); return a;} result: 21