1 what is the output of the following function and function call void calculatecost 5346748

1/ 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 //end of fragment

void calculatetCost)int count,float&subTotal,float&taxCost)

{

if ( count {

subTotal= count*0.50;

}

else

{

subTotal = count*0.20;

}

taxCost=0.1*subTotal;

}

a. The cost for 15 items is 3.00, and the tax for 3.00 is 0.30;

b. The cost for 15 items is 0.00, and the tax for 3.00 is 0.00

c.The cost for 15 items is 0.00, and the tax for 3.00 is 0.30;

d. The cost for 15 items is 3.00 and the tax for 3.00 is 0.00;

2/ What is the value of i after the following function call ?

//function definition

int dosomething(int value)

{

value=35;

return value;

value=13

}

//fragment of main program

int i=0

cout a. 13 b.35 c.48 d.0

3/ What is the output of the following function call ?

//function body

int factorial(int n)

{

int product=);

while(n>0)

{

product=product*n;

n+;

}

return product;

}

//fucntion call

cout

a.4 b.0 c.24 d.48

4/ Given the function definition

void something ( int a, int& b)

{

int c;

c=a+2;

a=a*3;

b=c+a;

}

what is the output of the following code fragment that invokes something ?

(All variable are type int.)

r=1;

s=2;

t=3;

something(t,s);

cout

a. 1 14 3 b.1 10 3

c.5 14 3 d. 1 14 9

e. none of the above

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now