NPTEL Problem Solving Through Programming in C | NPTEL Week 5 Quiz Assignment | NPTEL Assignment Solutions

NPTEL Problem Solving Through Programming in C Week 5 Quiz Assignment | NPTEL Swayam Assignment Answers


nptel problem solving through programming in c


MCQs (multiple choice questions) Nptel Week 5 Quiz Answers:

Q.1: What will be the output ? Options are:

what will be the output


 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:

which of the following is not an infinite loop?

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:

consider the following and identifyt he false statement(s)


 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:

compute the printed value of  'm' and 'n' of the C program given below



 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:

what should be in the place of of ***** so the except i=8, rest of the values of i


 a)      break
 b)      continue
 c)      switch
 d)      exit

Answer is (b) continue


Q.6: What will be the output ? Options are:

what will be the output


 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:

what will be the output


 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:


what will be the output of the program

 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:

    
for the C program given below, if the input given by the user is 7

 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:

what will be the output


 a)      0 1 2 3 4 5 6 7 8 9 11 12…..infinite times
 b)      1 2 3 4 5 6 7 8 9 11 12….infinite times
 c)    Won’t print anything
 d)      Error

Answer is  c)    Won’t print anything


If you are facing any queries regarding this assignment solutions, then please drop comment in comment section.



















Post a Comment

0 Comments