Menu

(Solved) : Give Value Array S Elements Following C Code Short Circuit Evaluation Used Repeat Question Q37182075 . . .

  1. Give the value of array a’s elements for thefollowing C code if short-circuit evaluation is used. Repeat thequestion for non-short-circuit evaluation. Justify your answer byshowing each and every step of calculation.

                       int i;
          int a[7] = {6,5,4,3,2,1,0};   
         for (i = 1, j = 0; i < 3 || ++ j <3; ++ i)
                        {
             if (i < 2 &&++ j) a[i] = i + j;         else a[i]= i * j;
                        }

Expert Answer


Answer to Give the value of array a’s elements for the following C code if short-circuit evaluation is used. Repeat the questio…

OR