1. Engineering
  2. Computer Science
  3. can u help me with thia hw show work plz...

Question: can u help me with thia hw show work plz...

Question details

ese ( T. print 3. Consider the code segment len arg.length; for (int ǐ = 1; i< len; i- i + 2) if (arg[i]0) System.out.print (argli]; else System.out.print( ; where arg is a one-dimensional array. What will be the result of running the code if arg is (3, 1, -2, -5, 3, o]? You should use Java to check your answer, but you must do it by hand (on paper) and show all work for any credit.

AP Computer Science A Unit 3: Arrays and Lists 1. Consider the following code segment, where arg is a one-dimensional array. al int n 0; for (int i-l; î< arg .1ength; ¡++) t Cargtil < 0) POINT A/ int [) mystery - new int [n]: int j 0; int i 0; while (j <n) produ of Produ if (arg [i] <0) mystery[j] i; /POINT B/ return mystery; pr (a) Let arg be the array (3,1,-2,-5,3,-1). What will be the value of n at the location marked as POINT A? upd 4t the Pant An: 3 (b) Let arg be the array (3,1,-2,-5,3,-1). What will be the values of i and j at the location marked as POINT B? ols Shols work

specified AP Unit 3: Arrays and Lists 3 (e) Let arg be the array (3,1,-2,-5,3,-1). What array will the program return? You may (and should) use Java to check your answer, but you must show your solution worked out on paper for any credit! C2 ,3, s tput (d) Briefly describe what the program does. How does the mystery array that is returned relate to the input array arg? Please write the names of any students you collaborated with in the box below. If you didnt receive help from any students, write N/A

Can u help me with thia hw show work plz

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution