Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started