Question: Show the initial and final contents of the array A int A[8] = {55,55,55,55,50,80,80,65} int T; bool cont = true; int n= 8, j =
Show the initial and final contents of the array A
int A[8] = {55,55,55,55,50,80,80,65}
int T; bool cont = true;
int n= 8, j = 1;
while (j < 8 && cont)
{
If (A[j] > A[0])
{
T = A[0];
A[0] = A[j];
A[j] = T;
cont = false;
}
else
J++;
}
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
