Question: What is the body of the loop to have the following output : 268 20 11 56 ? * int [] a = {

What is the body of the loop to have the following output 

What is the body of the loop to have the following output : 268 20 11 56 ? * int [] a = { 1, 5, 7, 19, 10, 55 }; for (int i = 0; i < a.length ; i += 2) a[i]++; for (int i = 1; i < a.length ; i += 2) _????_; a[i] = a[i]+2; a[i] = a[i]+1; O a[i] = a[i]- 1; O None of the above

Step by Step Solution

3.46 Rating (149 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Option a i a i 1 The body of a loop can contain more than one statement If it contains only one sta... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (2 attachments)

PDF file Icon

6364f054ecc33_239874.pdf

180 KBs PDF File

Word file Icon

6364f054ecc33_239874.docx

120 KBs Word File

Students Have Also Explored These Related Programming Questions!