NPTEL Problem Solving Through Programming in C Week 5 Quiz Assignment | NPTEL Swayam Assignment Answers
MCQs (multiple choice questions) Nptel Week 5 Quiz Answers:
Q.1: What will be the output ? Options are:
a) 10 9 8 7 6 5 4 3 2 1
b) 1 2 3 4 5 6 7 8 9 10
c) No output
d) None of the above statements are correct
Answer is (c) No output
Q.2: Which of the following is not an infinite loop? Options are:
Option (a)
Option (b)
Option (c)
Option (d)
Answer is Option (d) while(0)
Q.3: Consider the following and identifyt he false statement(s) ? Options are:
a) (i) and (ii)
b) (i), (ii), and (iv)
c) (ii)
d) (ii) and (iv)
Answer is (d) (ii) and (iv)
Q.4: Compute the printed value of 'm' and 'n' of the C program given below ? Options are:
a) 5, 7
b) 5, 5
c) 7, 7
d) 0, 0
Answer is (c) 7, 7
Q.5: What should be in the place of of ***** so the except i=8, rest of the values of i (as defined in the 'for' loop: i=0 to i=19) will be printed ? Options are:
a) break
b) continue
c) switch
d) exit
Answer is (b) continue
Q.6: What will be the output ? Options are:
a) NPTEL
b) IIT/IISc
c) NPTELSWAWAMIIT/IISc
d) Compilation error
Answer is (c) NPTELSWAWAMIIT/IISc
Q.7: What will be the output ? Options are:
a) 1,3
b) 1,3
3,1
c) 1,3
2,2
3,1
d) 0,0
Answer is c) 1,3
2,2
3,1
Q.8: What will be the output of the program ? Options are:
a) 4 will print 1 times
b) 4 will print 3 times
c) 4 will print 4 times
d) No output
Answer is (b) 4 will print 3 times
Q.9: For the C program given below, if the input given by the user is 7. What will be shown on the output window ? Options are:
a) The number is odd
b) The number is prime
c) The number is odd The number is prime
d) Syntax Error
Answer is (b) The number is prime
Q.10: What will be the output ? Options are:
0 Comments