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 : 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
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
Get step-by-step solutions from verified subject matter experts
Document Format (2 attachments)
6364f054ecc33_239874.pdf
180 KBs PDF File
6364f054ecc33_239874.docx
120 KBs Word File
