Question: int main ( ) { int arrayInt [ ] = { 4 , 8 , 3 , 1 1 , 1 3 , 6 ,

int main(){
int arrayInt[]={4,8,3,11,13,6,44,22,7,17};
int i, temp, count, stat;
stat =0;
while(stat ==0){
stat =1;
for( i =0; i <=9; i++){
if ((arrayInt[i]%2)==0){
if (arrayInt[i+1]%2!=0){
stat =0;
temp = arrayInt[i+1];
arrayInt[i+1]= arrayInt[i];
arrayInt[i]= temp; }}}}
for(i =0; i <=9; i++)
printf("%d ", arrayInt[i]);
printf("
");
return 0;
}

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!