Which option can replace xxx to enable the code to prin…

Given the code fragment:

Which option can replace xxx to enable the code to print 135?

Given the code fragment:

Which option can replace xxx to enable the code to print 135?

A.
int e = 0; e < = 4; e++

B.
int e = 0; e < 5; e + = 2

C.
int e = 1; e < = 5; e + = 1

D.
int e = 1; e < 5; e+ =2



Leave a Reply 2

Your email address will not be published. Required fields are marked *


Snr DingDong

Snr DingDong

Answer is B. e needs to begin at 0 to print first element and be incremented by two each iteration for 3 iterations. B does this successfully.