<em>ANSWER: </em>i think a blessing
<em>Explanation:</em> Social media has been ingrained into our society today to such extent that is virtually impossible for people to take you seriously, if you are not any social media platform. Everyone is on social media - young, old, rich, poor, etc. Everyone is always in a frenzy when it come to socializing online. Even the corporate world has jumped into the bandwagon and companies are very active online, posting, update and answering queries.
<u><em>HOPE THIS HELPS IF NOT SORRY</em></u>
Answer:
To reverse the elements in an array, the codes can be written as follows:
void reverse(int a[], int x)
{
int swap;
for(int i = 0; i < x/2 ; i++)
{
swap = a[i];
a[i] = a[x - i - 1];
a[x - i - 1] = swap;
}
}
Explanation:
There are two aspects that are worth for our concern:
First, in the for-loop, the condition should be set as "x / 2". In every iteration, there are two numbers in the array being swapped.
- a[0] swapped with a[x-1]
- a[1] swapped with a[x - 2]
- a[2] swapped with a[x - 3]
- .....
All the elements in the array shall complete swapping when it reaches its middle index.
Second, to ensure we always take the element from the last and followed with the second last, third last etc in next round of iteration, we need to formulate the index as "x - i - 1"