Question: The notation j1 indicates that a variable j is given value 1 , which should be contrasted with the notation j=1 that returns true if


The notation j1 indicates that a variable j is given value 1 , which should be contrasted with the notation j=1 that returns true if variable j contains the value 1. The notation for i+0 to 4 do indicates that the block of instructions upto the following end for is executed with i for each value between 0 and 4 inclusive. Hence the instructions: j1k0fori0to4dojj2kk+1endfor will leave j=32 and k=5. Now consider the following instructions, where j mod 6 indicates j modulo 6 (and hence returns 0 if j=6, returns 1 if j=7, etc): k0 jj2kk+1 end for will leave j=32 and k=5. Now cons returns 0 if j=6, returns 1 if j=7, ete k+0forj=0to12dok=k+(jmod6)endfor. What will the final value of k be? 30 78 15 6 None of the other answers
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
