This topic contains a solution. Click here to go to the answer

Author Question: Given the following function: void calc (int a, int& b){ int c; c = a + 2; a = a * 3; b = c + ... (Read 19 times)

itsmyluck

  • Hero Member
  • *****
  • Posts: 546
Given the following function:
void calc (int a, int& b)
{
   int c;
   c = a + 2;
   a = a * 3;
   b = c + a;
}
What is the output of the following code segment that invokes calc():
int x = 1;
int y = 2;
int z = 3;
calc(x, y);
cout << x << "  " << y << "  "  << z << endl;

1 14 9
2 3 4 5
1 2 3
3 6 3
1 6 3


Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by itsmyluck on May 22, 2019

chem1s3

  • Sr. Member
  • ****
  • Posts: 320
Lorsum iprem. Lorsus sur ipci. Lorsem sur iprem. Lorsum sur ipdi, lorsem sur ipci. Lorsum sur iprium, valum sur ipci et, vala sur ipci. Lorsem sur ipci, lorsa sur iprem. Valus sur ipdi. Lorsus sur iprium nunc, valem sur iprium. Valem sur ipdi. Lorsa sur iprium. Lorsum sur iprium. Valem sur ipdi. Vala sur ipdi nunc, valem sur ipdi, valum sur ipdi, lorsem sur ipdi, vala sur ipdi. Valem sur iprem nunc, lorsa sur iprium. Valum sur ipdi et, lorsus sur ipci. Valem sur iprem. Valem sur ipci. Lorsa sur iprium. Lorsem sur ipci, valus sur iprem. Lorsem sur iprem nunc, valus sur iprium.
Answer Preview
Only 64% of students answer this correctly




chem1s3

  • Sr. Member
  • ****
  • Posts: 320

 

Did you know?

Urine turns bright yellow if larger than normal amounts of certain substances are consumed; one of these substances is asparagus.

Did you know?

As many as 28% of hospitalized patients requiring mechanical ventilators to help them breathe (for more than 48 hours) will develop ventilator-associated pneumonia. Current therapy involves intravenous antibiotics, but new antibiotics that can be inhaled (and more directly treat the infection) are being developed.

Did you know?

Though Candida and Aspergillus species are the most common fungal pathogens causing invasive fungal disease in the immunocompromised, infections due to previously uncommon hyaline and dematiaceous filamentous fungi are occurring more often today. Rare fungal infections, once accurately diagnosed, may require surgical debridement, immunotherapy, and newer antifungals used singly or in combination with older antifungals, on a case-by-case basis.

Did you know?

The Centers for Disease Control and Prevention (CDC) was originally known as the Communicable Disease Center, which was formed to fight malaria. It was originally headquartered in Atlanta, Georgia, since the Southern states faced the worst threat from malaria.

Did you know?

In the United States, congenital cytomegalovirus causes one child to become disabled almost every hour. CMV is the leading preventable viral cause of development disability in newborns. These disabilities include hearing or vision loss, and cerebral palsy.

For a complete list of videos, visit our video library