Posted on 2005-04-19
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


    Compile it; run it; find out!

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
    Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
    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…
    The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

    755 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now