Consider the code segment
  int FUN()
{
  int i, j, x, y, m, n;
  n=20;
  for (i = 0; i < n; i++)
 {
    for (j = 0; j < n; j++)
   {
     if (i % 2)
      {
       x += ((4*j) + 5*i);
       y += (7 + 4*j);
      }
   }
 }
      return x+y;
}

Which one of the following is/are true?

1
The code contains loop invariant computation
2
There is scope of dead code elimination in this code
3
There is scope of strength reduction in this code
4
There is scope of common sub-expression elimination in this code

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation