Question

Assume the declarations: double x[8] = {3.0, 2.0, 8.0, 2.5, -1.0, 5.0, 2.0, 7.0}; int i=4; // initialized Suppose that each o

How would I solve this ???

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Initial array:
3_2_8_2.5_-1_5_2_7
(A) i is 4, so x[4] is assigned new value 4
3_2_8_2.5_4_5_2_7
(B) i is 4, so x[4] is assigned x[4]+5, x[4] = 4+5
3_2_8_2.5_9_5_2_7
(C) i-1 is 3 and 2*i-3 is 5, so x[3] = x[5]
3_2_8_5_9_5_2_7
(D) i is 4. x[5]=x[6]+x[7]
3_2_8_5_9_9_2_7
(E) i takes values: 3 4 5
3_2_8_9_9_2_2_7
(F) i takes values: 3 2 1 0
3_3_2_8_9_2_2_7


Answer: 3_3_2_8_9_2_2_7

____________________________
Comment down for any queries

Please give a thumb up

Add a comment
Know the answer?
Add Answer to:
How would I solve this ??? Assume the declarations: double x[8] = {3.0, 2.0, 8.0, 2.5,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT