147k views
1 vote
Write a single statement that assigns a new value to the first element of the array. This new value should be equal to twice the value stored in the last element of the array.

User Dminuoso
by
2.9k points

1 Answer

3 votes

Answer:

This question is incomplete, here is the complete question;

Write a single statement that assigns a new value to the element of the array indexed by j. This new value should be equal to twice the value stored in the next element of the array (i.e. the element after the element indexed by j)

Answer:

a[j] =2*a[j+1];

Step-by-step explanation:

With the solution above we have been able to allocate a fresh value to the element of the array which is also indexed as j and also gotten a worth that is equivalent to double the value stored in the next element of the array. An effective aim will be to get hold of a non-equivalent functional base only.

User Collins Orlando
by
4.0k points