Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

CSC 126 Spring 2017 Final Name 4) Given the following code: 1 include ciost ream

ID: 3843736 • Letter: C

Question



CSC 126 Spring 2017 Final Name 4) Given the following code: 1 include ciost reamy 2 winclude string 3 using name space std 4 void fct1 nt& a, int b); s string fct2(int c); 6 int main() int x, y 5; string message; 10 Cout "x x y y endl; 12 fict1(x, y); Cout x x y y end li 13 message fct 2 (x cout "x x y y message endl; 16 return e; 17 18 void fict1(int& a, int b) 19 cout "a a endl 20 a 5; 22 cout "b b endl 24 25 string fct (int num) if 27 num return "That is correct else return This is Not Correct

Explanation / Answer

Question a:

Answer is:

x = 10 y = 5
a = 10
b = 20
x = 15 y = 20
x = 15 y = 20 This is Not Correct!

Question b

Answer: 18 & 25

Function header consists of : Return Type, Function Name, Parameters, Function Body

Question c

Answer: 4 & 5

Question d

Answer: 18