Question: 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

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 does the function take?

What is the name of the function?

Question 2

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

Question 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);

Group of answer choices

formal parameter

argument

return type

Flag this Question

Question 4

Which statement is correct about a function prototype?

Group of answer choices

A function prototype is always optional.

A function prototype is only used in a header file.

A function prototype lets the compiler know what the return type and parameter types are for a function.

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

Question 5

What is the term for using a function?

Group of answer choices

call

function

use

access

Question 6

Which statement is not true about using functions?

Group of answer choices

It allows code reuse.

It provides easier testing and debugging.

It breaks a large problem into smaller ones.

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

Question 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

}

Group of answer choices

n1 and valueToConvert point to the exact same location in memory

n1 is a copy of valueToConvert

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!