Ask Question
9 August, 15:43

Select all that apply. Given the following code fragment, which of the things shown below happen when the statement on line 8 executes?

1 int square (int a) 2 {3 return a * a4 }5 int main () 6 {7 int x = 0; 8 x = square (5); 9 cout << x << endl; 10 return 0; 11 }

+4
Answers (1)
  1. 9 August, 17:53
    0
    A call to function square is made with the argument as 5 and then storing the result in the integer x which was defined above in the line 7. So when function square is called with value 5 the square function will return 5*5 that is 25 as an integer so we have to store it in an integer that was done by assigning it to integer x.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Select all that apply. Given the following code fragment, which of the things shown below happen when the statement on line 8 executes? 1 ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers