NPTEL Problem Solving Through Programming In C Assignment 2 Answers 2022

NPTEL Problem solving through Programming In C Assignment 2 Answers 2022 :- In this post, We have provided answers of NPTEL Problem Solving Through Programming In C Assignment 2 week 2. We provided answers here only for reference. Plz, do your assignment at your own knowledge.

ALSO READ :-
NPTEL Exam Result 2022 | NPTEL Swayam Result Download
NPTEL Registration Steps [July – Dec 2022]
NPTEL Exam Pattern Tips & Top Tricks [2022]

NPTEL Problem Solving Through Programming In C Assignment 2 Answers [July-2022]

1. A function is

a) Block of statements to perform some specific task
b) It is a fundamental modular unit to perform some task.
c) It has a name and can be used multiple times
d) All of the above

Answer:- d

2. If an integer needs two bytes of storage, then the minimum value of a signed integer in C would be

a) -(2-16-1)
b) 0
c) -(215 1)
d) -215

Answer:- d

Answers will be Uploaded Shortly and it will be Notified on Telegram, So JOIN NOW

NPTEL Problem Solving Through Programming In C Assignment 2 Answers 2022

3. Which of the following statements is correct?

I.     Keywords are those words whose meaning is already defined by Compiler.
II.    Keywords cannot be used as variable names.
III.   There are 32 keywords in C
IV.   C keywords are also called reserved words.

a) I and II
b) II and III
c) I, II and IV
d) All of the above

Answer:- d

4. What will be the output?

a) 1 3
b) 3 1
c) 1 1
d) 3 3

#include<stdio.h>
int main() {
int x = 1, y = 3;
int t=x;
x=y;
y =t;
printf("%d %d", x, y),
return 0;
}
Answer:- b

5. When executed the following code will print _______________ .

Answer:- 18

6. Which of the following are not standard header files in C?

a) stdio.h
b) conio.h
c) string.h
d) All are standard header file

Answer:- d

👇For Week 03 Assignment Answers👇

NPTEL Problem Solving Through Programming In C Assignment 2 Answers 2022

7. What is the output of the following code?

Answer:- 18.50

8. Which of the following is not a C variable?

a) Var123
b) Var_123
c) 123Var
d) X_123_Var

Answer:- c

9. What is the output of the following program?

a) 6
b) 3
c) 4
d) Compilation error

Answer:- d

10.

a) a=a-b; b=a-b; a=a+b;
b) a=a%b; b=a+b; a=a/b;
c) a=a+b; b=ab; a=a-b;
d) None of the above

Answer:- c

For More NPTEL Answers:- CLICK HERE

Join Our Telegram:- CLICK HERE

About Problem Solving Through Programming In C

This course is aimed at enabling the students to

  1. Formulate simple algorithms for arithmetic and logical problems
  2. Translate the algorithms to programs (in C language)
  3. Test and execute the programs and  correct syntax and logical errors
  4. Implement conditional branching, iteration and recursion
  5. Decompose a problem into functions and synthesize a complete program using divide and conquer approach
  6. Use arrays, pointers and structures to formulate algorithms and programs
  7. Apply programming to solve matrix addition and multiplication problems and searching and sorting problems 
  8. Apply programming to solve simple numerical method problems, namely rot finding of function, differentiation of function and simple integration

COURSE LAYOUT

  • Week 1 : Introduction to Problem Solving through programs, Flowcharts/Pseudo codes, the compilation process, Syntax and Semantic errors, Variables and Data Types 
  • Week 2 : Arithmetic expressions, Relational Operations, Logical expressions; Introduction to Conditional Branching
  • Week 3 : Conditional Branching and Iterative Loops
  • Week 4 : Arranging things : Arrays
  • Week 5 : 2-D arrays, Character Arrays and Strings 
  • Week 6 : Basic Algorithms including Numerical Algorithms
  • Week 7 : Functions and Parameter Passing by Value
  • Week 8 : Passing Arrays to Functions, Call by Reference
  • Week 9 : Recursion
  • Week 10 : Structures and Pointers
  • Week 11 : Self-Referential Structures and Introduction to Lists
  • Week 12 : Advanced Topics

CRITERIA TO GET A CERTIFICATE

This course will have an unproctored programming exam also apart from the Proctored exam, please check announcement section for date and time. The programming exam will have a weightage of 25% towards the Final score.

Final score = Assignment score + Unproctored programming exam score + Proctored Exam score

  • Assignment score = 25% of average of best 8 assignments out of the total 12 assignments given in the course. 
  • ( All assignments in a particular week will be counted towards final scoring – quizzes and programming assignments). 
  • Unproctored programming exam score = 25% of the average scores obtained as part of Unproctored programming exam – out of 100
  • Proctored Exam score =50% of the proctored certification exam score out of 100

YOU WILL BE ELIGIBLE FOR A CERTIFICATE ONLY IF ASSIGNMENT SCORE >=10/25 AND UNPROCTORED PROGRAMMING EXAM SCORE >=10/25 AND PROCTORED EXAM SCORE >= 20/50. 

If any one of the 3 criteria is not met, you will not be eligible for the certificate even if the Final score >= 40/100.

NPTEL Problem Solving Through Programming In C Assignment 2 Answers [July-2021]

Concepts Covered :

  • Example Problems
  • Simple Decision Making Examples
  • Idea of Optimization/Maximization
  • Path Finding
  • Maze Searching Problem

1.Which of the following statements is correct?

a) System software is dependent on application software 

b) Application software is dependent on system software 

c) Both are independent of each other

 d) None of the above.

2. The execution of any C program is

 a) Sequential 

b) Parallel 

c) Multi-threading 

d) None of these

3. A function is 

a) Block of statements to perform some specific task 

b) It is a fundamental modular unit to perform some task 

c) It has a name and can be used multiple times 

d) All of the above

4. Which of the following statements is correct?

I. Keywords are those words whose meaning is already defined by Compiler.
II. Keywords cannot be used as variable names.
III. There are 32 keywords in C.
IV. C keywords are also called as reserved words.

a) I and II 

b) II and III 

c) I, II and IV 

d) All of the above

5. We use the concept of ‘function’ for the following reason 

a) To use divide and conquer strategy 

b) For code reusability 

c) Enhances the logical clarity of the program 

d) All of the above

6. If an integer needs two bytes of storage, then the maximum value of a signed integer in C would be

a) (216 – 1)

b) 216

c) (215 – 1)

d) 215

7.

what is the output

a) 8 

b) 4 

c) 10 

d) 16

8.

whaat will be the output

a) The output is 21.00 

b) The output is 19.00 

c) The output is 0.00 

d) The output is 17.00

9. What is the output of the following program?

#include<stdio.h>

#define a 6

int main()

{

int a =3;

a = a+1;

printf(“%d”, a);

return 0;

}

a) 6 

b) 3

c) 4 

d) Compilation error

10. The Following C Program swaps the value of two numbers without using a third variable. What are the correct operations that need to be inserted inside the blanks?

The Following C Program swaps the value of two numbers without using a third variable. What are the correct operations that need to be inserted inside the blanks?

 a) a=a-b; b=a-b; a=a+b; 

b) a=a%b; b=a+b; a=a/b; 

c) a=a+b; b=a-b; a=a-b; 

d) None of the above

NPTEL Project Management For Managers Assignment 1 Answers

NPTEL SOFT SKILLS WEEK 2 ASSIGNMENT ANSWERS

NPTEL SOFT SKILLS WEEK 1 ASSIGNMENT ANSWERS

NPTEL Problem solving through Programming In C Assignment 2 Answers

1 thought on “NPTEL Problem Solving Through Programming In C Assignment 2 Answers 2022”

Leave a Comment