The following code should print Sum 10 but instead prints o

The following code should print \"Sum = 10\", but instead prints out some kind of weird number that changes every time yon run it. Fix it (with a single change in the second \"for\" loop). #include int main() {int i, sum = 0, A[5]; for (i = 0; i

Solution

12.

q = 7

x = 7

y = 4

z = 4

explanation :

inside main function you have initialized z value with 4 and q value with 7. so q=7 and z=4.

q and z passed to the function as parameters and at the function definition part x receives q value and y receives z value. so x=7 and y=4.

**********************END****************PLS GIVE ME GOOD RATING**********

 The following code should print \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site