Solved

Select All That Apply \quad Return a * A;
4 }
5 Int Main()
6

Question 11

Multiple Choice

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 \quad return a * a;
4 }
5 int main()
6 {
7 \quad int x = 0;
8 \quad x = square(5) ;
9 \quad cout << x << endl;
10 \quad return 0;
11 }


A) The square function is called and the value 5 is passed as an argument.
B) The square function calculates 5*5 and stores the result, 25, as a temporary value.
C) The temporary value is copied (assigned) to the variable x.
D) The temporary value is discarded by the system.
E) None of these

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions