Question: Assume the following declarations have been made: #define MAX 5 0 int a [ MAX ] , i , j , temp; What is the

Assume the following declarations have been made:
#define MAX 50
int a[ MAX ], i, j, temp;
What is the effect of this program segment?
for (i =0; i < MAX /2; ++i){
temp = a[i];
a[i]= a[MAX - i -1];
a[MAX - i -1]= temp;
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!