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 21 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?

Allergies play a major part in the health of children. The most prevalent childhood allergies are milk, egg, soy, wheat, peanuts, tree nuts, and seafood.

Did you know?

Vampire bats have a natural anticoagulant in their saliva that permits continuous bleeding after they painlessly open a wound with their incisors. This capillary blood does not cause any significant blood loss to their victims.

Did you know?

The most dangerous mercury compound, dimethyl mercury, is so toxic that even a few microliters spilled on the skin can cause death. Mercury has been shown to accumulate in higher amounts in the following types of fish than other types: swordfish, shark, mackerel, tilefish, crab, and tuna.

Did you know?

Oliver Wendell Holmes is credited with introducing the words "anesthesia" and "anesthetic" into the English language in 1846.

Did you know?

Nitroglycerin is used to alleviate various heart-related conditions, and it is also the chief component of dynamite (but mixed in a solid clay base to stabilize it).

For a complete list of videos, visit our video library