Answer:
c. 65
Explanation:
The output is 65.
An array of length 10 is created first. Then, the first for-loop fill the array with different values; The array element now become: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11. The array element are generated using the equation a[i] = i + 2; so when i is 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. i must be less than the array length (10).
a[0] = 0 + 2 = 2
a[1] = 1 + 2 = 3
a[2] = 2 + 2 = 4
a[3] = 3 + 2 = 5
a[4] = 4 + 2 = 6
a[5] = 5 + 2 = 7
a[6] = 6 + 2 = 8
a[7] = 7 + 2 = 9
a[8] = 8 + 2 = 10
a[9] = 9 + 2 = 11
result variable is declared and initialized to 0.
The second for-loop goes through the array and add individual element to result.
Answer:
Explanation:
Given that,
A point charge is placed between two charges
Q1 = 4 μC
Q2 = -1 μC
Distance between the two charges is 1m
We want to find the point when the electric field will be zero.
Electric field can be calculated using
E = kQ/r²
Let the point charge be at a distance x from the first charge Q1, then, it will be at 1 -x from the second charge.
Then, the magnitude of the electric at point x is zero.
E = kQ1 / r² + kQ2 / r²
0 = kQ1 / x² - kQ2 / (1-x)²
kQ1 / x² = kQ2 / (1-x)²
Divide through by k
Q1 / x² = Q2 / (1-x)²
4μ / x² = 1μ / (1 - x)²
Divide through by μ
4 / x² = 1 / (1-x)²
Cross multiply
4(1-x)² = x²
4(1-2x+x²) = x²
4 - 8x + 4x² = x²
4x² - 8x + 4 - x² = 0
3x² - 8x + 4 = 0
Check attachment for solution of quadratic equation
We found that,
x = 2m or x = ⅔m
So, the electric field will be zero if placed ⅔m from point charge A, OR ⅓m from point charge B.