Question: An array is set to hold the following values in this order: 20, 1034, 53, 1 and 196. (a) Declare a one dimensional array as

An array is set to hold the following values in this order: 20, 1034, 53, 1 and 196.

(a) Declare a one dimensional array as SourceArray with the values as stated above.

(5 marks)

(b) Write a program to copy the above array to another target array called as targetArray [].

(10 marks)

(c) Using the same program above, write a Java codes to print out only the even numbers in the targetArray.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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

Students Have Also Explored These Related Databases Questions!