Problem Solving Through Programming In C Nptel Week 1 Assignment Answers

Are you looking for Problem Solving Through Programming In C Week 1 Answers. All assignment answers of Problem Solving Through Programming In C available at Progiez


Problem Solving Through Programming In C Week 1 Answers
Problem Solving Through Programming In C Week 1 Answers

Problem Solving Through Programming In C Week 1 Answers (July-Dec 2025)

Question 1. Which of the following is a valid C variable name?
a) 2variable
b) variable_2
c) variable-2
d) variable.2

View Answers


Question 2. CPU comprises of
a) ALU- Arithmetic and Logic Unit
b) Registers
c) Control unit
d) All of the above

View Answers


Question 3. Choose the correct statements from the following
i) In high-level language, testing and debugging a program is difficult than assembly language.
ii) C programs are highly portable on any type of operating system platform.
iii) A flowchart is a visual representation of the sequence of steps for solving a problem.
iv) The role of a compiler is to translate source program statements to decimal codes.
a) (i) and (ii)
b) (ii) and (iii)
c) (i), (ii), and (iii)
d) (ii), (iii), and (iv)

View Answers


Question 4. Which of the following functions is used to read a single character from the keyboard in C?
a) printf()
b) scanf()
c) getchar()
d) puts()

View Answers


Question 5. What is the purpose of the #include directive in a C program?
a) To include a library file.
b) To define a library file.
c) To define a constant.
d) To start the main function.

View Answers


Question 6. An interpreter reads the source code of a program
a) one line at a time
b) two line at a time
c) complete program in one stroke
d) None of these

View Answers


Question 7. In C programming, what is the best way to comment multiple lines?
a) Using // at the beginning of each line.
b) Enclosing the comments between /* and */.
c) Using # at the beginning of each line.
d) Enclosing the comments between { and }.

View Answers


Question 8. Which of the following statements is true regarding variable declaration in C?
a) Variables can be declared at any point in the program.
b) Variables must be declared before they are used.
c) Variables are automatically initialized to zero.
d) Variable names can start with a digit.

View Answers


Question 9. What will be the output of the flowchart given below?
START → Read Numbers a=3, b=2 → b=a*b+b/5 → print b → STOP
a) 4
b) 8
c) 16
d) 20

View Answers


Question 10. The print values of “a” and “b” of the flowchart below are:
START → Declare variables and assign values a=4 & b=6 → a=a+b → b=a-b → a=a-b → print values of a & b → STOP
a) a=4, b=6
b) a=6, b=4
c) a=10, b=2
d) a=2, b=10

View Answers


Problem Solving Through Programming In C Week 1 Answers (Jan-Apr 2025)

Course Link: Click Here


Que. 1) Set of instructions to be provided to an electronic machine to perform a task is called
A) Programming
B) Processing
C) Computing
D) Compiling

View Answer


Que. 2) Compiler helps in the translation from
A) Integer to binary
B) High-level program to binary digits
C) High-level language to machine level language
D) Pseudo code to computer program

View Answer


Que. 3) The ALU unit of computer
A) Can perform logical operation only
B) Can perform arithmetic operation only
C) Can perform both arithmetic and logical operations
D) None of the above

View Answer


Que. 4) What type of device is a computer printer?
A) Memory
B) Output
C) Storage
D) Input

View Answer


Que. 5) Algorithm is –
A) A process or set of rules to be followed in calculations or other problem-solving operations, especially by a human
B) A process or set of rules to be followed to solve numerical problems only
C) A process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer
D) A process or set of rules to be followed to solve logical problems only

View Answer


Que. 6) When we write X=10 and Y=X, which of the following memory assignment is correct?
A) X and Y will have the same location and 10 will be stored
B) X and Y will have two distinct locations and 10 will be stored in both
C) X and Y will have the same location, and only X will contain value 10
D) X and Y will have two distinct locations, and only X will contain value 10

View Answer


Que. 7) The input N from the user is 6. The output of the following algorithm is
A) 21
B) 720
C) 1
D) 2

View Answer


Que. 8) What will be the output of the algorithm given below?
A) 51
B) 52
C) 50
D) Compilation error

View Answer


Que. 9) The following algorithm is used to find a number X is even or odd. What will be the content of the empty box?
A) X%10=0?
B) X/10=0?
C) X/2=0?
D) X%2=0?

View Answer


Que. 10) X is an integer (X=2648). The print value of Y of the flowchart below is
A) 20
B) 22664488
C) 8462
D) 0

View Answer


Problem Solving Through Programming In C Week 1 Answers (July-Dec 2024)

Course Link: Click Here

For answers or latest updates join our telegram channel: Click here to join

These are Problem Solving Through Programming In C Week 1 Answers


Q1. Which of the following is a valid C variable name?
a) 2variable
b) variable_2
c) variable-2
d) variable.2

View Answer


Q2.Which of the following functions is used to read a single character from the keyboard in C?
a) printf()
b) scanf()
c) getchar()
d) puts()

View Answer


For answers or latest updates join our telegram channel: Click here to join

These are Problem Solving Through Programming In C Week 1 Answers


Q3.What is the purpose of the #include directive in a C program?
a) To include a library file.
b) To include a library file.
c) To define a constant.
d) To start the main function

Answer: b) To include a library file.


Q4.Which of the following correctly describes the purpose of a compiler in C?
a) To execute the program line by line.
b) To convert source code into machine code.
c) To provide a runtime environment for program execution.
d) To interpret and run the program interactively.

Answer:b) To convert source code into machine code.


For answers or latest updates join our telegram channel: Click here to join

These are Problem Solving Through Programming In C Week 1 Answers


Q5.Which of the following is true about the execution nature of C programs?
a) C programs are executed in an event-based manner.
b) C programs are executed concurrently.
c) C programs are executed in a multi-threaded manner.
d) C programs are executed sequentially.

Answer:d) C programs are executed sequentially.


Q6.In C programming, what is the best way to comment multiple lines?
a) Using // at the beginning of each line.
b) Enclosing the comments between /* and */.
c) Using # at the beginning of each line.
d) Enclosing the comments between { and }.

Answer: b) Enclosing the comments between /* and */.


For answers or latest updates join our telegram channel: Click here to join

These are Problem Solving Through Programming In C Week 1 Answers


Q7.Which of the following is a characteristic of the ASCII standard?
a) It supports encoding for all the world’s languages.
b) It uses 16-bit encoding for characters.
c) It is a 7-bit character encoding standard.
d) None of the above.

Answer: c) It is a 7-bit character encoding standard.


Q8.Which of the following statements is true regarding variable declaration in C?
a) Variables can be declared at any point in the program.
b) Variables must be declared before they are used.
c) Variables are automatically initialized to zero.
d) Variable names can start with a digit.

Answer: b) Variables must be declared before they are used.


For answers or latest updates join our telegram channel: Click here to join

These are Problem Solving Through Programming In C Week 1 Answers


Q9. What will be the output of the flowchart given below?
a) 4
b) 8
c) 16
d) 20

Answer: c) 16


Q10. The output of the following algorithm is

a) 21
b) 28
c) 30
d) 40

Answer: b) 28


For answers or latest updates join our telegram channel: Click here to join

These are Problem Solving Through Programming In C Week 1 Answers


All weeks of Problem Solving Through Programming in C : Click Here

More Nptel Courses: https://progiez.com/nptel-assignment-answers


These are Problem Solving Through Programming In C Week 1 Nptel Answers