Question: 1.Answer the questions below about this function prototype: double coinTotal (double coinValue, int nCoins); What is the type of the return value? How many parameters

1.Answer the questions below about this function prototype:

double coinTotal (double coinValue, int nCoins);

What is the type of the return value?

How many parameters does the function take? ( )

What is the name of the function? ( )

2.These are defined in the function heading and tell a user what data needs to be sent to a function.( )

3.

What is the term used for a variable sent as data in a function call, such as n1 in the example below?

int n1;

int convertedValue = convert(n1);

A)formal parameter

B)formal parameter

C)return type

4.Which statement is correct about a function prototype?

A)

A function prototype is always optional.
B)A function prototype is only used in a header file.
C)A function prototype lets the compiler know what the return type and parameter types are for a function.

D)A function prototype is always placed after a call to the function.

5.What is the term for using a function?

A)call

B)function

C)use

D)access

6.Which statement is not true about using functions?

A)
It allows code reuse.
B)It provides easier testing and debugging.
C)It breaks a large problem into smaller ones.
D)

It doesn't let you break up your program into different files.

7.

For the function and function call shown below, which statement is true about the relationship between n1 and valueToConvert?

int n1;

int convertedValue = convert(n1);

int convert (int valueToConvert)

{

// function body is here

}

A)n1 and valueToConvert point to the exact same location in memory

B)n1 is a copy of valueToConvert

C) valueToConvert will have the same value as n1
valueToConvert has no relationship to n1

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!