Question: Consider the vi program shown in Fig. B3a. i. For the while loop, what is the last value of i before end of the
Consider the vi program shown in Fig. B3a. i. For the "while" loop, what is the last value of i before end of the loop? (3 marks) ii. Write down the array elements of "Array 1". (15 marks) iii. For the "for" loop, what is the last value of i before end of the loop? (3 marks) iv. Write down the array elements of "Array 2". (9 marks) (3 marks) v. Is the array "Result" a 1-D or 2-D array ? vi. What is the data of "Value"? (6 marks) vii. What is the data of "Element" ? (6 marks) 8 zap Select 5210 8 SE 2 1 (b) Fig. B3b shows the False case of a vi program. Write down the output formula of this case, i. Array 1 False STIL Array 2 Array Size Result OF THE Draw the True case of a vi program if the output formula is: Y = A + B Value 9825 Index Array Element 321 LIFE Fig. Q3b Fig. Q3a (6 marks) (9 marks)
Step by Step Solution
3.42 Rating (149 Votes )
There are 3 Steps involved in it
Answera i The last value of i before the end of the while loop is 0 Explanation This is because the while loop condition is i 1 and the loop will cont... View full answer
Get step-by-step solutions from verified subject matter experts
