Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Transaction Processing

Authors: Philip M. Lewis, Arthur Bernstein, Michael Kifer

1st Edition

0201708728, 978-0201708721

More Books

Students also viewed these Databases questions