Question: 1. In this general syntax of a function: type name ( parameter1, parameter2, ...) { statements } what is type? 2. For the following function

1. In this general syntax of a function:

type name ( parameter1, parameter2, ...) { statements }

what is "type"?

2. For the following function header answer the 3 questions below

bool CheckNumber (float a)

- what is CheckNumber? - Does the function return anything? If yes give an example of value returned by this function. - show a possible call of this function

3. Where do all functions prototypes go?

4.In the following program make a change such that you don't need the variable z.

// function example #include using namespace std; int addition (int a, int b) { int r; r=a+b; return r; } int main () { int x, y, z; z = addition (5,3); cout << "The result is " << z; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!