Initial array:
3_2_8_2.5_-1_5_2_7
(A) i is 4, so x[4] is assigned new value 4
3_2_8_2.5_4_5_2_7
(B) i is 4, so x[4] is assigned x[4]+5, x[4] =
4+5
3_2_8_2.5_9_5_2_7
(C) i-1 is 3 and 2*i-3 is 5, so x[3] = x[5]
3_2_8_5_9_5_2_7
(D) i is 4. x[5]=x[6]+x[7]
3_2_8_5_9_9_2_7
(E) i takes values: 3 4 5
3_2_8_9_9_2_2_7
(F) i takes values: 3 2 1 0
3_3_2_8_9_2_2_7
Answer: 3_3_2_8_9_2_2_7
____________________________
Comment down for any queries
Please give a thumb up
How would I solve this ??? Assume the declarations: double x[8] = {3.0, 2.0, 8.0, 2.5,...
х у V 1.0 7.6 1.0 1.0 2.0 8.7 11 2.0 2.0 3.0 7.3 3.0 3.0 4.0 5.8 11 10- 9- 8 7-1 6 5- 4+ 3+ 2 4.0 4.0 11 10 9+ 8+ 71 6+ 5+ 4+ 3+ 2+ 1. X 5.0 8.2 5.0 5.0 6.0 4.9 6.0 6.0 X 7.0 4.5 7.0 7.0 8.0 7.2. 8.0 8.0 0 1 2 3 4 5 6 7 8 9 10 11 7 8 9 10 11 9.0 5.9 9.0 9.0...
8 Suppose the following declarations and statement are in effect. What are the values of x and y in each case? *p *q; = (b) int x = 1, y = 3, *m = &x, *n = &у; *n = 5; *a += 2; (8)Please solve written in details. (4)Notice the semi colon and explain. PLEASE NO CODING(both) 4 Determine the output produced by each of the following statements: (a) for (i = 6; 1 > 0;-1) print (-") (b)...
7. What is the value of this expression: 2.5 2/4 A. 2.5 B 3.0 C. 1 D. 1.125 In the following 4 questions, assume we have the code segment below: int numberl 5 number2 10; double number3 3.0, number4 2.5 8. What is the value of the variable x1 after this statement is executed? double x1-numberl /number2: A. 0.5 B. 1 C. 0 D. 2 What is the value of the variable x2 after this statement is executed? double x2...
After the following declarations and statements are executed: int i, j, k ; boolean c; float x, y, z; int[ ] num = {4, 1, 2, 3, 8}; i = 3; j = 5; x = 4.3; y = 58.209; c = !(i > j) ; what is the value of c
I have questions declare of array several form. Question . Write array declarations for the following data: i) x = An array of 15 double type numbers ii) ? = [ 1 0 0 2 0 0 3 0 0] iii) word = 10 words of at most 9 characters each iv) Z = A 5 × 10 matrix of all zeroes THX! language is C
What can you tell me about the following proton NMR? The following is benzocaine 0 9.0 8.0 7.0 6.0 5.0 4.0 3.0 2.0 X: parts per Million: Proton 8 LSE. 8 96E, t PZE" z091 196L 996L 8 O'E 2 2 9LET 2 SZET 8 8 8 0 9.0 8.0 7.0 6.0 5.0 4.0 3.0 2.0 X: parts per Million: Proton 8 LSE. 8 96E, t PZE" z091 196L 996L 8 O'E 2 2 9LET 2 SZET 8 8 8
Which of the following are valid array declarations? a. int[] array- new int[10]; b. double [array double[10]; c. charl charArray "Computer Science"; None of the above Analyze the following code: class Test public static void main(Stringl] args) System.out.println(xMethod(10); public static int xMethod(int n) System.out.println("int"); return n; public static long xMethod(long n) System.out.,println("long"); return n The program displays int followed by 10 The program displays long followed by 10. The program does not compile. None of the above. tions 3-4 are...
x = 0 is an ordinary point of a certain linear differential equation. After the assumed solution y = ∞ n = 0 cnxn is substituted into the DE, the following algebraic system is obtained by equating the coefficients of x0, x1, x2, and x3 to zero. 2c2 + 2c1 + c0 = 0 6c3 + 4c2 + c1 = 0 12c4 + 6c3 + c2 − 1 3 c1 = 0 20c5 + 8c4 + c3 − 2 3...
Below are four bivariate data sets and the scatter plot for each. (Note that each scatter plot is displayed on the same scale.) Each data set is made up of sample values drawn from a population. x y 1.0 7.9 2.0 5.1 3.0 10.1 4.0 6.4 х 11 10+ 9+ 8+ 7+ 6+ 5- X X 1.0 7.3 117 10+ 2.0 9.0 9+ 3.0 7.3 8+ 7 4.0 5.6 6+ 5.0 7.9 5 4 6.0 5.3 2 7.0 4.8 5.0...
1.) Using the following declarations and a member of the Array class, int [ ] bArray = new int [10]; int location; Using a method in the Array class, write a statement that would order the values in the bArray array in ascending order. ___________________ HINT: You must write the full statement which includes a call to a method in the Array class. 2.) Using the following declarations and a member of the Array class, int [ ] bArray =...