Milan1999 Anju Mehral
in tob() : initially i=0;
if(4%2) ---→ if(0) so, it execute else statement… a[0] = 0 then b=2, i =1;
if(2%2) ---→ if(0) so, it execute else statement… a[1] = 0 then b=1, i=2;
if(1%2) ---→ if(1) so, it execute if statement….. a[2] = 1 then b=0, i=3;
and for loop break and return(i=3) to the calling function…
i.e, len = 3;