In the given C-code which line is a part of loop invariant?
for (i = 0 ; i < n ; i ++)
{
1. J = J + i ;
2. x = y * z ;
}
1
Only line 1
2
Only line 2
3
Both 1 and 2 line
4
None of the above
In the given C-code which line is a part of loop invariant?
for (i = 0 ; i < n ; i ++)
{
1. J = J + i ;
2. x = y * z ;
}