EXPLAINED ANSWERS FOR IP MID-TERM MODEL QUESTIONS
For the above question, the answer is (c). Let's get answer by answer. (a) 1020 This answer will be given when we type the following code; It will be printed in the terminal as follows; (b)2010 This answer will be given when we type the follwing code; It will be given in the terminal as follows; (c)10 We already know the answer of this question is 10. 10 can be given in several ways. In the question we assume that the answer would be 1020. But it isn't. Look at the figures given below. I typed the given example in the vi editor. As the result of the above code I got the following output. The above answer will be given by the following code also; (d)20 20 will be given by following code; It'll appear in the terminal as follows; (e) run time error This can't be correct, refer the answer (c) For above question the answer is (d) 1. It's a little bit tricky but if you know the ...