NPTEL Problem Solving Through Programming In C Week 4 Assignment Answers 2025

NPTEL Problem Solving Through Programming In C Week 4 Assignment Answers 2025

1. The control/conditional statements used in C is/are

a) if-else statements
b) switch statements
c) Both (a) and (b)
d) None of these

Answer :- For Answers Click Here 

2.

a) x=1
b) x=0
c) Depends on compiler
d) No output

Answer :- 

3.

a) 2
b) 3
c) 4
d) Compiler error

Answer :- 

4. If multiple conditions are used in a single if statement then the testing of those conditions are done

a) From Right to Left
b) From Left to right
c) Randomly
d) None

Answer :- 

5.

a) Sum of the digits of a number
b) Negative sum of the digits of a number
c) Reverse of a number
d) The same number is printed

Answer :- For Answers Click Here 

6. while(1) is used in a program to create

a) False statement
b) Infinite loop
c) Terminating the loop
d) Never executed loop

Answer :- 

7.

a) a=5, b=6, c=2;
b) a=6, b=7, c=1;
c) a=6, b=6, c=2;
d) a=5, b=7, c=1;

Answer :- 

8.

a) NPTEL
b) PROGRAMMING
c) No output
d) Compilation error as A and a are not declared as character variable

Answer :- 

9. switch statement in C, do not accept which data types from the list below:

a) int
b) char
c) long
d) enum

Answer :- 

10.

a) Choice is 1
b) Choice other than 1
c) Both (a) and (b)
d) Syntax error

Answer :- For Answers Click Here 
Scroll to Top