Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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 Systems For Advanced Applications Dasfaa 2023 International Workshops Bdms 2023 Bdqm 2023 Gdma 2023 Bundlers 2023 Tianjin China April 17 20 2023 Proceedings Lncs 13922

Authors: Amr El Abbadi ,Gillian Dobbie ,Zhiyong Feng ,Lu Chen ,Xiaohui Tao ,Yingxia Shao ,Hongzhi Yin

1st Edition

3031354141, 978-3031354144

More Books

Students also viewed these Databases questions

Question

Find '(x), ''(x), and ''(x). (x) = x 2 e 3x

Answered: 1 week ago

Question

What are some of the possible scenes from our future?

Answered: 1 week ago