[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now



Posted on 2005-04-19
Medium Priority
Last Modified: 2012-05-05
What is the output of the following function and function call?
void calculateCost(int count, float& subTotal, float& taxCost);
float tax = 0.0,
subTotal = 0.0;
calculateCost(15, subTotal,tax);
cout << "The cost for 15 items is " << subtotal
<< ", and the tax for " << subTotal << " is " << tax << endl;
//end of fragment
void calculateCost(int count, float& subTotal, float& taxCost)
if ( count < 10)
subTotal = count * 0.50;
subTotal = count * 0.20;
taxCost = 0.1 * subTotal;
Question by:cuong5985
1 Comment
LVL 12

Accepted Solution

andrewjb earned 40 total points
ID: 13816952

Compile it; run it; find out!

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question