[go: up one dir, main page]

0% found this document useful (0 votes)
2 views75 pages

Nptel C 2021 Jan To April

The document outlines the structure and content of an online course titled 'Problem Solving through Programming in C' offered by NPTEL. It includes details about assignments, quizzes, and evaluations for various weeks, along with questions and correct answers related to programming concepts. The assignments cover topics such as definitions of programming, computer components, and basic C programming principles.

Uploaded by

madhushreejs12
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views75 pages

Nptel C 2021 Jan To April

The document outlines the structure and content of an online course titled 'Problem Solving through Programming in C' offered by NPTEL. It includes details about assignments, quizzes, and evaluations for various weeks, along with questions and correct answers related to programming concepts. The assignments cover topics such as definitions of programming, computer components, and basic C programming principles.

Uploaded by

madhushreejs12
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 75

8/9/22, 10:45 AM Problem solving through Programming In C - - Unit 2 - Week 0 : Assignment 0

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

Uploaded by youtube.com/c/getpythoncode
getpythoncode@gmail.com 
Contact me at amazonking616@gmail.com
Telegram id - @Ak4Gp
NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Problem solving through Programming In C

(course)

Course
outline Assignment 0
The due date for submitting this assignment has passed.
How does an Due on 2021-01-25, 23:59 IST.
NPTEL online
course work?
() Assignment submitted on 2021-01-13, 08:09 IST
The marks of week 0 assignment will not be consider for evaluation
Week 0 :
Assignment 0 1) Which among the following is the most complete definition of Programming? 1 point
()
Programming is a process to solve any logical problems.
Quiz: Programming is a process to solve any numerical problem.
Assignment 0
Programming is a process to solve any real life problems.
(assessment?
name=118) Programming is the process of taking an algorithm and encoding it into a notation (using a
programming language), so that it can be executed by a computer.
Week 1 ()
Yes, the answer is correct.
Score: 1
Week 2 () Accepted Answers:
Programming is the process of taking an algorithm and encoding it into a notation (using a
Week 3 () programming language), so that it can be executed by a computer.

2) Which of the following controls the way in which the computer system works and give 1 point
Week 4 ()
means by which users can interact with the computer?

Week 5 () The motherboard


The operating system
Week 6 ()
The application software

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=16&assessment=118 1/4
8/9/22, 10:45 AM Problem solving through Programming In C - - Unit 2 - Week 0 : Assignment 0

Week 7 () The RAM

Yes, the answer is correct.


Week 8 () Score: 1
Accepted Answers:
The operating system
Week 9 ()
3) CPU consists of 1 point
Week 10 ()
ALU, Control Unit
Week 11 () ALU, Main memory, Control Unit
ALU, monitor, Registers
Week 12 ()
ALU, Control Unit, Hard Disk

Programming No, the answer is incorrect.


Exam Oct Score: 0
2021 (First Accepted Answers:
ALU, Control Unit
Session):
(10.00AM - 4) C was developed by 1 point
11.00AM). ()
Alan Turing
Programming Charles Babbage
Exam Oct
Ada Lovelace
2021(Second
Session): Dennis Ritchie
(8.00PM - Yes, the answer is correct.
9.00PM). () Score: 1
Accepted Answers:
Programming Dennis Ritchie
Exam 2022
5) C is- 1 point
(First
Session) General-purpose programming language
(10am - 11am)
Domain-specific programming language
()
Page description programming language
Programming None of the above
Exam 2022
Yes, the answer is correct.
(Second Score: 1
Session) Accepted Answers:
(8pm - 9pm) () General-purpose programming language

6) The relation between bit and byte in digital logic is 1 point

1 byte = 10 bits
1 byte = 16 bits
1 byte = 8 bits
1 byte = 2 bits
No, the answer is incorrect.
Score: 0
Accepted Answers:

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=16&assessment=118 2/4
8/9/22, 10:45 AM Problem solving through Programming In C - - Unit 2 - Week 0 : Assignment 0

1 byte = 8 bits

7) Which of the following is not a programming language? 1 point

C
Unix
Java
Python

Yes, the answer is correct.


Score: 1
Accepted Answers:
Unix

8) The binary AND operation of the numbers “100101” and “110011” results (in decimal) 1 point

100001
2
33
63

Yes, the answer is correct.


Score: 1
Accepted Answers:
33

9) Which of the following is not an input device of computer? 1 point

Printer
Mouse
Keyboard
Joystick

Yes, the answer is correct.


Score: 1
Accepted Answers:
Printer

10) The process through which an user can find error(s) in a program is called 1 point

Compiling
Searching
Debugging
Processing

Yes, the answer is correct.


Score: 1
Accepted Answers:
Debugging

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=16&assessment=118 3/4
8/9/22, 10:45 AM Problem solving through Programming In C - - Unit 2 - Week 0 : Assignment 0

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=16&assessment=118 4/4
8/9/22, 10:46 AM Problem solving through Programming In C - - Unit 3 - Week 1

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

getpythoncode@gmail.com 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Problem solving through Programming In C

(course)

Course
outline Assignment 1
The due date for submitting this assignment has passed.
How does an Due on 2021-02-03, 23:59 IST.
NPTEL online
course work?
() Assignment submitted on 2021-01-15, 22:31 IST
1) Set of instructions to be provided to an electronic machine to perform a task is called 1 point
Week 0 :
Assignment 0 a) Programming
() b) Processing
c) Computing
Week 1 ()
d) Compiling
Lecture 1 :
Yes, the answer is correct.
Introduction Score: 1
(unit? Accepted Answers:
unit=17&lesson=18) a) Programming
Lecture 2: Idea
2) Compiler helps in the translation from 1 point
of Algorithms
(unit? a) Integer to binary
unit=17&lesson=19)
b) High-level program to binary digits
Lecture 3: Flow c) High-level language to machine level language
Chart and
Pseudocode
d) Pseudo code to computer program
(unit? Yes, the answer is correct.
unit=17&lesson=20) Score: 1
Accepted Answers:
Lecture 4 :
c) High-level language to machine level language
Introduction to

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=17&assessment=119 1/6
8/9/22, 10:46 AM Problem solving through Programming In C - - Unit 3 - Week 1

Programming 3) The ALU unit of computer 1 point


Language
Concepts (unit? a) Can perform logical operation only
unit=17&lesson=21)
b) Can perform arithmetic operation only
Lecture 5 : c) Can perform both arithmetic and logical operations
Variables and
d) None of the above.
Memory (unit?
unit=17&lesson=22) Yes, the answer is correct.
Score: 1
Quiz: Accepted Answers:
Assignment 1 c) Can perform both arithmetic and logical operations
(assessment?
name=119) 4) What type of device is computer printer? 1 point

Feedback For a) Memory


Week 1 (unit?
b) Output
unit=17&lesson=23)
c) Storage
Week 2 () d) Input

Yes, the answer is correct.


Week 3 () Score: 1
Accepted Answers:
Week 4 () b) Output

Week 5 () 5) Algorithm is - 1 point

a) A process or set of rules to be followed in calculations or other problem-solving


Week 6 ()
operations, especially by a human.
b) A process or set of rules to be followed to solve numerical problems only.
Week 7 ()
c) A process or set of rules to be followed in calculations or other problem-solving
Week 8 () operations, especially by a computer.
d) A process or set of rules to be followed to solve logical problems only.
Week 9 ()
Yes, the answer is correct.
Score: 1
Week 10 () Accepted Answers:
c) A process or set of rules to be followed in calculations or other problem-solving operations,
Week 11 () especially by a computer.

6) When we write X=10 and Y=X, which of the following memory assignment is correct 1 point
Week 12 ()
a) X and Y will have same location and 10 will be stored.
Programming
b) X and Y will have two distinct locations and 10 will be stored in both.
Exam Oct
2021 (First c) X and Y will have same location and only X will contain value 10
Session): d) X and Y will have two distinct locations and only X will contain value 10
(10.00AM -
Yes, the answer is correct.
11.00AM). () Score: 1
Accepted Answers:
Programming b) X and Y will have two distinct locations and 10 will be stored in both.
Exam Oct
2021(Second

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=17&assessment=119 2/6
8/9/22, 10:46 AM Problem solving through Programming In C - - Unit 3 - Week 1

Session): 7) The input N from the user is 6. The output of the following algorithm is 1 point
(8.00PM -
9.00PM). ()

Programming
Exam 2022
(First
Session)
(10am - 11am)
()

Programming
Exam 2022
(Second
Session)
(8pm - 9pm) ()

a) 21
b) 720
c) 1
d) 2
Yes, the answer is correct.
Score: 1
Accepted Answers:
c) 1

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=17&assessment=119 3/6
8/9/22, 10:46 AM Problem solving through Programming In C - - Unit 3 - Week 1

8) What will be the output of the algorithm given below? 1 point

a) 51
b) 52
c) 50
d) Compilation error
Yes, the answer is correct.
Score: 1
Accepted Answers:
d) Compilation error

9) The following algorithm is used to find a number X is even or odd. What will be the 1 point
content of the empty box?

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=17&assessment=119 4/6
8/9/22, 10:46 AM Problem solving through Programming In C - - Unit 3 - Week 1

a) X%10=0?
b) X/10=0?
c) X/2=0?
d) X%2=0?

Yes, the answer is correct.


Score: 1
Accepted Answers:
d) X%2=0?

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=17&assessment=119 5/6
8/9/22, 10:46 AM Problem solving through Programming In C - - Unit 3 - Week 1

10) X is an integer (X=2648). The print value of Y of the flowchart below is 1 point

a) 20
b) 22664488
c) 8462
d) 0
Yes, the answer is correct.
Score: 1
Accepted Answers:
c) 8462

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=17&assessment=119 6/6
8/9/22, 10:46 AM Problem solving through Programming In C - - Unit 4 - Week 2

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

getpythoncode@gmail.com 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Problem solving through Programming In C

(course)

Course
outline Assignment 2
The due date for submitting this assignment has passed.
How does an Due on 2021-02-07, 23:59 IST.
NPTEL online
course work?
() Assignment submitted on 2021-01-23, 22:18 IST
1) Which of the following cannot be used as a variable in C programming? 1 point
Week 0 :
Assignment 0 a) Var123
() b) Var_123
c) 123Var
Week 1 ()
d) X_123_Var
Week 2 () Yes, the answer is correct.
Score: 1
Lecture 6 : Accepted Answers:
Types of c) 123Var
Software and
Compilers 2) Which of the following is not a correct variable type in C? 1 point
(unit?
unit=24&lesson=25) a) int
b) bool
Lecture 7:
Introduction to c) char
C Programming d) All of above are correct variable type
Language
Yes, the answer is correct.
(unit?
Score: 1
unit=24&lesson=26)
Accepted Answers:
d) All of above are correct variable type

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=24&assessment=120 1/5
8/9/22, 10:46 AM Problem solving through Programming In C - - Unit 4 - Week 2

Lecture 8 : 3) The execution of any C program is 1 point


Variables and
Variable Types a) Sequential
in C (unit? b) Parallel
unit=24&lesson=27)
c) Multi-threading
Lecture 9 : d) None of these
Introducing
Yes, the answer is correct.
Functions
Score: 1
(unit?
Accepted Answers:
unit=24&lesson=28)
a) Sequential
Lecture 10 :
4) Which of the following statements is correct? 1 point
Address and
Content of I. Keywords are those words whose meaning is already defined by Compiler.
Variables and II. Keywords cannot be used as variable names.
Types (unit? III. There are 32 keywords in C.
unit=24&lesson=29) IV. C keywords are also called as reserved words.

Quiz: a) I and II
Assignment 2
(assessment?
b) II and III
name=120) c) I, II and IV

Feedback For d) All of the above


Week 2 (unit? Yes, the answer is correct.
unit=24&lesson=30) Score: 1
Accepted Answers:
Week 3 () d) All of the above

Week 4 () 5) A function is 1 point

a) Block of statements to perform some specific task


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

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


d) All of the above
Week 7 ()
Yes, the answer is correct.
Score: 1
Week 8 () Accepted Answers:
d) All of the above
Week 9 ()
6) 1 point

Week 10 ()

Week 11 ()

Week 12 ()

Programming
Exam Oct
2021 (First

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=24&assessment=120 2/5
8/9/22, 10:46 AM Problem solving through Programming In C - - Unit 4 - Week 2

Session):
(10.00AM -
11.00AM). ()

Programming
Exam Oct
2021(Second
Session):
(8.00PM -
9.00PM). ()

Programming a) 28.2
Exam 2022
b) 21.00
(First
Session) c) 16.00
(10am - 11am) d) 12.00
()
Yes, the answer is correct.
Score: 1
Programming Accepted Answers:
Exam 2022 d) 12.00
(Second
Session) 7) 1 point
(8pm - 9pm) ()

a) 106
b) 70
c) 79
d) Compiler error

Yes, the answer is correct.


Score: 1
Accepted Answers:
c) 79

8) If integer needs two bytes of storage, then the minimum value of a signed integer in C 1 point
would be

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=24&assessment=120 3/5
8/9/22, 10:46 AM Problem solving through Programming In C - - Unit 4 - Week 2

Yes, the answer is correct.


Score: 1
Accepted Answers:

9) 1 point

a) 9
b) 0
c) 1001
d) Compilation Error

Yes, the answer is correct.


Score: 1
Accepted Answers:
d) Compilation Error

10)

18.50

Hint

Y h i

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=24&assessment=120 4/5
8/9/22, 10:46 AM Problem solving through Programming In C - - Unit 4 - Week 2

Yes, the answer is correct.


Score: 1
Accepted Answers:
(Type: Regex Match) 8.5

1 point

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=24&assessment=120 5/5
8/9/22, 10:46 AM Problem solving through Programming In C - - Unit 5 - Week 3

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

getpythoncode@gmail.com 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Problem solving through Programming In C

(course)

Course
outline Assignment 3
The due date for submitting this assignment has passed.
How does an Due on 2021-02-10, 23:59 IST.
NPTEL online
course work?
() Assignment submitted on 2021-01-29, 18:25 IST
1) The precedence of arithmetic operators is (from highest to lowest) 1 point
Week 0 :
Assignment 0 a) %, *, /, +, –
() b) %, +, /, *, –
c) +, -, %, *, /
Week 1 ()
d) %, +, -, *, /
Week 2 () Yes, the answer is correct.
Score: 1
Week 3 () Accepted Answers:
a) %, *, /, +, –
Lecture 11 :
2) 1 point
Assignment
Statement and
Operators in C
(unit?
unit=31&lesson=32)

Lecture 12 :
Arithmetic
Expressions
and Relational
Expressions

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=31&assessment=121 1/6
8/9/22, 10:46 AM Problem solving through Programming In C - - Unit 5 - Week 3

(unit?
unit=31&lesson=33)

Lecture 13 :
Logical
Operators and
Change in
Control Flow
(unit?
unit=31&lesson=34)

Lecture 14 :
Use of Logical
Operators in
Branching
(unit?
unit=31&lesson=35)

Lecture 15 : a) -1
Branching : IF -
b) 1
ELSE
Statement c) 0
(unit? d) Compilation error
unit=31&lesson=36)
Yes, the answer is correct.
Quiz: Score: 1
Assignment 3 Accepted Answers:
(assessment? d) Compilation error
name=121)
3) 1 point
Week-03
Program-01
(/noc21_cs01/progassignment?
name=122)

Week-03
Program-02
(/noc21_cs01/progassignment?
name=123)

Week-03
Program-03
(/noc21_cs01/progassignment?
name=124)

Week-03
a) -42
Program-04
(/noc21_cs01/progassignment? b) 24
name=125) c) 15

Feedback For d) -34


Week 3 (unit?
Yes, the answer is correct.
unit=31&lesson=37) Score: 1
Accepted Answers:
Week 4 () c) 15

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=31&assessment=121 2/6
8/9/22, 10:46 AM Problem solving through Programming In C - - Unit 5 - Week 3

4) 1 point
Week 5 ()

Week 6 ()

Week 7 ()

Week 8 ()

Week 9 ()

Week 10 ()

Week 11 ()

a) 0
Week 12 ()
b) 3
Programming c) 4
Exam Oct d) Compilation error
2021 (First
Session): Yes, the answer is correct.
Score: 1
(10.00AM -
Accepted Answers:
11.00AM). ()
c) 4

Programming 5) 1 point
Exam Oct
2021(Second
Session):
(8.00PM -
9.00PM). ()

Programming
Exam 2022
(First
Session)
(10am - 11am)
()

Programming
Exam 2022
(Second
Session)
(8pm - 9pm) () a) TRUE
b) FALSE
c) Syntax Error
d) Compilation Error

Yes, the answer is correct.


Score: 1
A dA

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=31&assessment=121 3/6
8/9/22, 10:46 AM Problem solving through Programming In C - - Unit 5 - Week 3

Accepted Answers:
b) FALSE

6) 1 point

a) IITKGP
b) IITD and IITM
c) IITKGP and IITM
d) IITM

Yes, the answer is correct.


Score: 1
Accepted Answers:
a) IITKGP

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=31&assessment=121 4/6
8/9/22, 10:46 AM Problem solving through Programming In C - - Unit 5 - Week 3

7) 1 point

a) TRUE
b) FALSE
c) Compilation Error
d) Compiler Dependent

Yes, the answer is correct.


Score: 1
Accepted Answers:
a) TRUE

8) Which of the following statement is correct? 1 point

a) Operator precedence determines which operator is performed first in an expression with


more than one operator with different precedence.
Associativity is used when two operators of same precedence appear in an expression
b) Operator associativity determines which operator is performed first in an expression with
more than one operator with different associativity.
Precedence is used when two operators of same precedence appear in an expression
c) Operator precedence and associativity are same.
d) None of the above

Yes, the answer is correct.


Score: 1
Accepted Answers:
a) Operator precedence determines which operator is performed first in an expression with more
than one operator with different precedence.
Associativity is used when two operators of same precedence appear in an expression

9) Which of the following method are accepted for assignment? 1 point

a) 8=x=y=z
b) x=8=y=z

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=31&assessment=121 5/6
8/9/22, 10:46 AM Problem solving through Programming In C - - Unit 5 - Week 3

c) x=y=z=8
d) None

Yes, the answer is correct.


Score: 1
Accepted Answers:
c) x=y=z=8

10) 1 point

a. 0
b. 1
c. 7
d. Compilation error

Yes, the answer is correct.


Score: 1
Accepted Answers:
a. 0

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=31&assessment=121 6/6
8/9/22, 10:47 AM Problem solving through Programming In C - - Unit 6 - Week 4

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

getpythoncode@gmail.com 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Problem solving through Programming In C

(course)

Course
outline Assignment 4
The due date for submitting this assignment has passed.
How does an Due on 2021-02-17, 23:59 IST.
NPTEL online
course work?
() Assignment submitted on 2021-02-07, 14:54 IST
Assignment 4
Week 0 :
Assignment 0 1) The control/conditional statements used in C is/are 1 point
()
a) if-else statements

Week 1 () b) switch statements


c) Both (a) and (b)
Week 2 () d) None of these

Yes, the answer is correct.


Week 3 () Score: 1
Accepted Answers:
Week 4 () c) Both (a) and (b)

Lecture 16: IF-


ELSE
Statement
(Contd.) (unit?
unit=38&lesson=39)

Lecture 17:
Switch
statement

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=38&assessment=126 1/5
8/9/22, 10:47 AM Problem solving through Programming In C - - Unit 6 - Week 4

(unit? 2) 1 point
unit=38&lesson=40)

Lecture 18:
Switch
Statement
(Contd.) and
Introduction to
Loops (unit?
unit=38&lesson=41)

Lecture 19:
Implementing
Repetitions
(Loops) (unit?
unit=38&lesson=42)

Lecture 20:
Implementation a) x=1
of Loops with b) x=0
for Statement
c) Depends on compiler
(Contd.) (unit?
unit=38&lesson=43) d) No print statements

Quiz: Yes, the answer is correct.


Score: 1
Assignment 4
(assessment?
Accepted Answers:
name=126)
d) No print statements

Week-04 3) 1 point
Program-01
(/noc21_cs01/progassignment?
name=128)

Week-04
Program-02
(/noc21_cs01/progassignment?
name=129)

Week-04
Program-03
(/noc21_cs01/progassignment?
name=130)
a) 2
Week-04
b) 3
Program-04
(/noc21_cs01/progassignment? c) 4
name=131) d) Compiler error
Week-04 Yes, the answer is correct.
Problem-05 Score: 1
Accepted Answers:
(/noc21_cs01/progassignment?
name=132) a) 2

Feedback For 4) If multiple conditions are used in a single if statement then the testing of those 1 point
Week 4 (unit? conditions are done

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=38&assessment=126 2/5
8/9/22, 10:47 AM Problem solving through Programming In C - - Unit 6 - Week 4

unit=38&lesson=44) a) From Right to Left

Week 5 () b) From Left to right


c) Randomly
Week 6 () d) None

Yes, the answer is correct.


Week 7 () Score: 1
Accepted Answers:
Week 8 () b) From Left to right

5) 1 point
Week 9 ()

Week 10 ()

Week 11 ()

Week 12 ()

Programming
Exam Oct
2021 (First
Session):
(10.00AM -
11.00AM). ()

Programming
Exam Oct
2021(Second
Session):
(8.00PM -
9.00PM). ()

Programming a) Sum of the digits of a number


Exam 2022
b) Negative sum of the digits of a number
(First
Session) c) Reverse of a number
(10am - 11am) d) The same number is printed
()
Yes, the answer is correct.
Score: 1
Programming Accepted Answers:
Exam 2022 b) Negative sum of the digits of a number
(Second
Session) 6) while(1) is used in a program to create 1 point
(8pm - 9pm) ()
a) False statement
b) Infinite loop
c) Terminating the loop
d) Never executed loop

Y h i

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=38&assessment=126 3/5
8/9/22, 10:47 AM Problem solving through Programming In C - - Unit 6 - Week 4

Yes, the answer is correct.


Score: 1
Accepted Answers:
b) Infinite loop

7) 1 point

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;

Yes, the answer is correct.


Score: 1
Accepted Answers:
c) a=6, b=6, c=2;

8) 1 point

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

Yes, the answer is correct.


Score: 1
Accepted Answers:
a) NPTEL

9) Switch statement accepts 1 point

a) int
b) char
c) long

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=38&assessment=126 4/5
8/9/22, 10:47 AM Problem solving through Programming In C - - Unit 6 - Week 4

d) All of the above

Yes, the answer is correct.


Score: 1
Accepted Answers:
d) All of the above

10) 1 point

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

Yes, the answer is correct.


Score: 1
Accepted Answers:
c) Both (a) and (b)

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=38&assessment=126 5/5
8/9/22, 10:47 AM Problem solving through Programming In C - - Unit 7 - Week 5

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

getpythoncode@gmail.com 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Problem solving through Programming In C

(course)

Course
outline Assignment 5
The due date for submitting this assignment has passed.
How does an Due on 2021-02-24, 23:59 IST.
NPTEL online
course work?
() Assignment submitted on 2021-02-15, 08:06 IST
Assignment 5
Week 0 :
Assignment 0 1) In C language three way transfer of control is possible using 1 point
()
a) Ternary operator

Week 1 () b) Unary operator


c) Logical operator
Week 2 () d) None

Yes, the answer is correct.


Week 3 () Score: 1
Accepted Answers:
Week 4 () a) Ternary operator

Week 5 () 2) The loop in which the statements within the loop are executed at least once is called 1 point

Lecture 21: For a) for


Statement b) do-while
(Contd.) (unit?
c) while
unit=45&lesson=46)
d) goto
Lecture 22:
Yes, the answer is correct.
Example of If-
Score: 1

A dA

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=45&assessment=127 1/6
8/9/22, 10:47 AM Problem solving through Programming In C - - Unit 7 - Week 5

Else (unit? Accepted Answers:


unit=45&lesson=47) b) do-while

Lecture 23 : 3) 1 point
Example of
Loops (unit?
unit=45&lesson=48)

Lecture 24 :
Example of
Loops (Contd.)
(unit?
unit=45&lesson=49)

Lecture 25 :
Example of
Loops (Contd.),
Use of FOR
a) Error
Loops (unit?
unit=45&lesson=50) b) I love C -- will be printed 6 times
c) I love C -- will be printed 3 times
Quiz:
Assignment 5 d) I love C –will be printed 5 times
(assessment?
Yes, the answer is correct.
name=127) Score: 1
Week-05 Accepted Answers:
Problem-01 c) I love C -- will be printed 3 times
(/noc21_cs01/progassignment?
4) 1 point
name=133)

Week-05
Problem-02
(/noc21_cs01/progassignment?
name=134)

Week-05
Problem-03
(/noc21_cs01/progassignment?
name=135)

Week-05
Program-04
(/noc21_cs01/progassignment?
name=136)

Week-05
Program-05 a) ‘while vs do-while’ once
(/noc21_cs01/progassignment?
b) ‘Out of loop’ infinite times
name=137)
c) Both ‘while vs do-while’ and ‘Out of loop’ once
Feedback For
d) ‘while vs do-while’ infinite times
Week 5 (unit?
unit=45&lesson=51) Yes, the answer is correct.
Score: 1
Week 6 () Accepted Answers:

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=45&assessment=127 2/6
8/9/22, 10:47 AM Problem solving through Programming In C - - Unit 7 - Week 5

Week 7 () d) ‘while vs do-while’ infinite times

5) 1 point
Week 8 ()

Week 9 ()

Week 10 ()

Week 11 ()

Week 12 ()

Programming
Exam Oct
2021 (First
Session):
(10.00AM -
11.00AM). ()
a) 0
Programming b) 1
Exam Oct c) No output
2021(Second
d) Compiler error
Session):
(8.00PM - Yes, the answer is correct.
9.00PM). () Score: 1
Accepted Answers:
Programming d) Compiler error
Exam 2022 6) 1 point
(First
Session)
(10am - 11am)
()

Programming
Exam 2022
(Second
Session)
(8pm - 9pm) ()

a) 5
b) 4
c) 1

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=45&assessment=127 3/6
8/9/22, 10:47 AM Problem solving through Programming In C - - Unit 7 - Week 5

d) No output

Yes, the answer is correct.


Score: 1
Accepted Answers:
d) No output

7) 1 point

a) Syntax error
b) 0 1 2 3 4 5 6 7 8 9 10
c) 1 2 3 4 5 6 7 8 9 10
d) 0 1 2 3 4 5 6 7 8 9

Yes, the answer is correct.


Score: 1
Accepted Answers:
c) 1 2 3 4 5 6 7 8 9 10

8) 1 point

a) True

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=45&assessment=127 4/6
8/9/22, 10:47 AM Problem solving through Programming In C - - Unit 7 - Week 5

b) False
c) Both ‘True’ and ‘False’
d) Compilation error

Yes, the answer is correct.


Score: 1
Accepted Answers:
c) Both ‘True’ and ‘False’

9) 1 point

a) 5,4
b) 7,4
c) 5,6
d) 6,4

Yes, the answer is correct.


Score: 1
Accepted Answers:
b) 7,4

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=45&assessment=127 5/6
8/9/22, 10:47 AM Problem solving through Programming In C - - Unit 7 - Week 5

10) 1 point

a) 10
b) 11
c) 12
d) 13

Yes, the answer is correct.


Score: 1
Accepted Answers:
d) 13

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=45&assessment=127 6/6
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 8 - Week 6

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

getpythoncode@gmail.com 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Problem solving through Programming In C

(course)

Course
outline Assignment 6
The due date for submitting this assignment has passed.
How does an Due on 2021-03-03, 23:59 IST.
NPTEL online
course work?
() Assignment submitted on 2021-02-21, 19:45 IST
1) Which of the statements is correct? 1 point
Week 0 :
Assignment 0 a) An array contains more than one element
() b) All elements of array have to be of same data type
c) The size of array has to be declared upfront
Week 1 ()
d) All of the above
Week 2 () Yes, the answer is correct.
Score: 1
Week 3 () Accepted Answers:
d) All of the above
Week 4 () 2) An integer array of size 15 is declared in a C program. The memory location of the first 1 point
byte of the array is 2000. What will be the location of the 13th element of the array? Assume int data
Week 5 () type takes 2 bytes of memory.

Week 6 () a) 2013
b) 2024
Lecture 26:
Introduction to
c) 2026
Arrays (unit? d) 2030
unit=52&lesson=53)
Yes, the answer is correct.
Score: 1
A dA

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=52&assessment=138 1/6
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 8 - Week 6

Accepted Answers:
Lecture 27:
b) 2024
Arrays (Contd.)
(unit? 3) Which statement is correct? 1 point
unit=52&lesson=54)
a) An index or subscript in array is a positive integer
Lecture 28:
Arrays (Contd.) b) An index or subscript in array is a positive or negative integer
(unit? c) An index or subscript in array is a real number
unit=52&lesson=55)
d) None
Lecture 29:
Yes, the answer is correct.
Program using Score: 1
Arrays (unit?
Accepted Answers:
unit=52&lesson=56)
a) An index or subscript in array is a positive integer
Lecture 30:
Array Problem
4)What will happen if in a C program you assign a value to an 1 point

(unit? array element whose index exceeds the size of array?


unit=52&lesson=57)
a) The element will be set to 0
Quiz:
Assignment 6
b) The compiler will not give any error but program may crash if
(assessment? some important data gets overwritten.
name=138) c) The compiler would report an error.
Week-06 d) The array size would appropriately grow.
Program-01
No, the answer is incorrect.
(/noc21_cs01/progassignment?
Score: 0
name=139) Accepted Answers:
Week-06 b) The compiler will not give any error but program may crash if some
Program-02 important data gets overwritten.
(/noc21_cs01/progassignment?
name=140) 5) Which of the following statements is correct for the following code snippet? 1 point
int num[7];
Week-06 num[7]=8;
Program-03
(/noc21_cs01/progassignment? a) In the first statement 7 specifies a particular element, whereas in the second statement it
name=141)
specifies a type;
Week-06 b) In the first statement 7 specifies a particular element, whereas in the second statement it
Program-04 specifies the array size.
(/noc21_cs01/progassignment?
c) In the first statement 7 specifies the array size, whereas in the second statement it
name=142)
specifies a particular element of array.
Week-06
d) In both the statement 7 specifies array size.
Program-05
Yes, the answer is correct.
(/noc21_cs01/progassignment?
name=143) Score: 1
Accepted Answers:
Feedback For c) In the first statement 7 specifies the array size, whereas in the second statement it specifies a
Week 6 (unit? particular element of array.
unit=52&lesson=58)

Week 7 ()

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=52&assessment=138 2/6
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 8 - Week 6

6) 0 points
Week 8 ()

Week 9 ()

Week 10 ()

Week 11 ()

Week 12 ()

Programming
Exam Oct
2021 (First a) 3 followed by garbage values
Session):
b) 3 0 0
(10.00AM -
11.00AM). () c) 3 1 1
d) Syntax error
Programming
No, the answer is incorrect.
Exam Oct Score: 0
2021(Second Accepted Answers:
Session): b) 3 0 0
(8.00PM -
9.00PM). () 7) 1 point

Programming
Exam 2022
(First
Session)
(10am - 11am)
()

Programming
Exam 2022
(Second
Session)
(8pm - 9pm) ()

a) i=5, j=5, k=2


b) i=6, j=5, k=3
c) i=6, j=4, k=2
d) i=5, j=4, k=2

Yes, the answer is correct.


Score: 1
Accepted Answers:
a) i=5, j=5, k=2

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=52&assessment=138 3/6
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 8 - Week 6

8) 1 point

a) 1
b) 2
c) 3
d) 4

Yes, the answer is correct.


Score: 1
Accepted Answers:
d) 4

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=52&assessment=138 4/6
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 8 - Week 6

9)

Hint

Yes, the answer is correct.


Score: 1
Accepted Answers:
(Type: Numeric) 8

1 point

10) 1 point

a) 5,4

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=52&assessment=138 5/6
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 8 - Week 6

b) 5,5
c) 4,4
d) 3,4

Yes, the answer is correct.


Score: 1
Accepted Answers:
c) 4,4

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=52&assessment=138 6/6
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 9 - Week 7

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

getpythoncode@gmail.com 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Problem solving through Programming In C

(course)

Course
outline Assignment 7
The due date for submitting this assignment has passed.
How does an Due on 2021-03-10, 23:59 IST.
NPTEL online
course work?
() Assignment submitted on 2021-03-06, 07:29 IST
1) Which of the following statements are correct? 1 point
Week 0 : 1) A string is a collection of characters terminated by '\0'.
Assignment 0 2) The format specifier %s is used to print a string.
()
3) The length of the string can be obtained by using the function strlen().
4) The pointer cannot work on string
Week 1 ()
a) 1,2
Week 2 () b) 1,2,3
c) 2,4
Week 3 ()
d) 1,3
Week 4 () Yes, the answer is correct.
Score: 1
Week 5 () Accepted Answers:
b) 1,2,3

Week 6 () 2) The correct method of initializing a 2D array is 1 point

Week 7 () int abc[2][2] = {1, 2, 3 ,4}


Lecture 31 :
int abc[ ][ ] = {1, 2, 3 ,4}
Linear Search int abc[2][ ] = {1, 2, 3 ,4}
All of the above
Y h i

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=59&assessment=144 1/5
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 9 - Week 7

(unit? Yes, the answer is correct.


unit=59&lesson=60) Score: 1
Accepted Answers:
Lecture 32 :
int abc[2][2] = {1, 2, 3 ,4}
Character Array
and Strings 3) Array passed as an argument to a function is interpreted as 1 point
(unit?
unit=59&lesson=61) a) Address of all the elements in an array

Lecture 33 :
b) Value of the first element of the array
String c) Address of the first element of the array
Operations
d) Number of element of the array
(unit?
unit=59&lesson=62) Yes, the answer is correct.
Score: 1
Lecture 34 : 2- Accepted Answers:
D Array c) Address of the first element of the array
Operation
(unit? 4)
unit=59&lesson=63)

Lecture 35 :
Introducing
Functions
(unit?
unit=59&lesson=64)

Quiz:
Assignment 7
(assessment?
name=144)
10
Week-07
Program-01
Hint
(/noc21_cs01/progassignment?
name=145)
Yes, the answer is correct.
Week-07 Score: 1
Program-02 Accepted Answers:
(/noc21_cs01/progassignment?
(Type: Numeric) 10
name=146)
1 point
Week-07
Program-03 5) 1 point
(/noc21_cs01/progassignment?
name=147)

Week-07
Program-04
(/noc21_cs01/progassignment?
name=148)

Week-07
Program-05
(/noc21_cs01/progassignment?
name=149)

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=59&assessment=144 2/5
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 9 - Week 7

Feedback For a) fellows


Week 7 (unit?
b) h
unit=59&lesson=65)
c) fello
Week 8 () d) Compiler error

Yes, the answer is correct.


Week 9 () Score: 1
Accepted Answers:
Week 10 () a) fellows

6) 1 point
Week 11 ()

Week 12 ()

Programming
Exam Oct
2021 (First
Session):
(10.00AM -
11.00AM). ()

Programming
Exam Oct
2021(Second
Session):
(8.00PM -
9.00PM). ()

Programming a) n1=18, n2=17


Exam 2022 b) n1=18, n2=18
(First
c) n1=17, n1=17
Session)
(10am - 11am) d) n1=17, n2=18
() Yes, the answer is correct.
Score: 1
Programming Accepted Answers:
Exam 2022 a) n1=18, n2=17
(Second
Session)
(8pm - 9pm) ()

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=59&assessment=144 3/5
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 9 - Week 7

7) 1 point

a) gnirts
b) gnirt
c) string
d) Nothing is printed

Yes, the answer is correct.


Score: 1
Accepted Answers:
d) Nothing is printed

8) If the starting address of a floating point array Arr[10][10] is 2000, 1 point


what would be the memory address of the element Arr[5][6]? (Considering float takes 4
bytes of memory)

a) 2268
b) 2120
c) 2224
d) 2144

Yes, the answer is correct.


Score: 1
Accepted Answers:
c) 2224

9) In C, the placement of elements of a two dimensional array is 1 point

a) Row wise

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=59&assessment=144 4/5
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 9 - Week 7

b) Column wise
c) Diagonal wise
d) Bottom to top wise

Yes, the answer is correct.


Score: 1
Accepted Answers:
a) Row wise

10)

Hint

Yes, the answer is correct.


Score: 1
Accepted Answers:
(Type: Numeric) 0

1 point

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=59&assessment=144 5/5
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 10 - Week 8

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

getpythoncode@gmail.com 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Problem solving through Programming In C

(course)

Course
outline Assignment 8
The due date for submitting this assignment has passed.
How does an Due on 2021-03-17, 23:59 IST.
NPTEL online
course work?
() Assignment submitted on 2021-03-17, 21:46 IST
1) A function prototype is used for 1 point
Week 0 :
Assignment 0 a) Declaring the function logic
() b) Calling the function from the main body
c) Telling the compiler, the kind of arguments used in the function
Week 1 ()
d) Telling the user for proper use of syntax while calling the function
Week 2 () Yes, the answer is correct.
Score: 1
Week 3 () Accepted Answers:
c) Telling the compiler, the kind of arguments used in the function
Week 4 ()

Week 5 ()

Week 6 ()

Week 7 ()

Week 8 ()

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=66&assessment=150 1/7
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 10 - Week 8

Lecture 36: 2) 1 point


More on
Functions
(unit?
unit=66&lesson=67)

Lecture 37:
Function
(Contd.) (unit?
unit=66&lesson=68)

Lecture 38:
Scanf and
Printf
Functions;
Function
Prototype (unit?
unit=66&lesson=69)

Lecture 39 :
Parameter
Passing in
Function
Revision (unit?
unit=66&lesson=70)
a) Compiler error as foo() is not declared in main
Lecture 40:
b) 1 2
Parameter
Passing in c) 2 1
Function d) Compile time error due to declaration of functions inside main
Revision
(Contd.) (unit?
Yes, the answer is correct.
Score: 1
unit=66&lesson=71)
Accepted Answers:
Quiz: b) 1 2
Assignment 8
3) 1 point
(assessment?
name=150)

Feedback For
Week 8 (unit?
unit=66&lesson=72)

Week 9 ()

Week 10 ()

Week 11 ()

Week 12 ()

Programming
Exam Oct
2021 (First

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=66&assessment=150 2/7
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 10 - Week 8

Session):
(10.00AM -
11.00AM). ()

Programming
Exam Oct
2021(Second
Session):
(8.00PM -
9.00PM). ()

Programming
Exam 2022
(First
Session)
(10am - 11am)
()

Programming
Exam 2022
(Second
Session)
(8pm - 9pm) ()

a) Only once
b) Zero times
c) Infinite times
d) Compilation error

No, the answer is incorrect.


Score: 0
Accepted Answers:
b) Zero times

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=66&assessment=150 3/7
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 10 - Week 8

4) 1 point

a) 27.08
b) 27.083334
c) Compiler error as result is declared twice
d) Error: Invalid prototype declaration

Yes, the answer is correct.


Score: 1
Accepted Answers:
a) 27.08

5) Which statement is correct about Passing by value parameters? 1 point

a) It cannot change the actual parameter value


b) It can change the actual parameter value
c) Parameters is always in read-write mode
d) None of them
Yes, the answer is correct.
Score: 1
Accepted Answers:
a) It cannot change the actual parameter value

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=66&assessment=150 4/7
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 10 - Week 8

6) 1 point

a) 70
b) Garbage value
c) Compilation error
d) None

Yes, the answer is correct.


Score: 1
Accepted Answers:
c) Compilation error

7) 1 point

a) Infinite times
b) 32767
c) 65535
d) Till stack overflows

No, the answer is incorrect.


Score: 0
Accepted Answers:
d) Till stack overflows

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=66&assessment=150 5/7
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 10 - Week 8

8) 1 point

a) 8 ,4, 0, 2, 14
b) 8, 4, 0, 2, 0
c) 2, 0, 4, 8. 14
d) 2, 0, 4, 8, 0

Yes, the answer is correct.


Score: 1
Accepted Answers:
d) 2, 0, 4, 8, 0

9) 1 point

a) Maximum of a, b
b) Positive difference between a and b

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=66&assessment=150 6/7
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 10 - Week 8

c) Sum of a and b
d) Minimum of a and b

Yes, the answer is correct.


Score: 1
Accepted Answers:
d) Minimum of a and b

10) 1 point

a) 89
b) 90
c) 91
d) 92

Yes, the answer is correct.


Score: 1
Accepted Answers:
c) 91

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=66&assessment=150 7/7
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 11 - Week 9

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

getpythoncode@gmail.com 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Problem solving through Programming In C

(course)

Course
outline Assignment 9
The due date for submitting this assignment has passed.
How does an Due on 2021-03-24, 23:59 IST.
NPTEL online
course work?
() Assignment submitted on 2021-03-14, 07:29 IST
Assignment 9
Week 0 :
Assignment 0 1) Which of the following are C pre-processor directive? 1 point
()
a) #ifdef

Week 1 () b) #define
c) #endif
Week 2 () d) all of the mentioned

Yes, the answer is correct.


Week 3 () Score: 1
Accepted Answers:
Week 4 () d) all of the mentioned

Week 5 () 2) What is the correct order of insertion sort (in ascending order) of the array arr[5]={8 3 5 1 point
9 4}?
Week 6 ()
a) {3 8 5 9 4} --> {3 5 8 9 4} --> {3 4 5 8 9}
b) {3 8 5 9 4} --> {3 5 8 9 4} --> {3 5 8 4 9} --> {3 5 4 8 9} --> {3 4 5 8 9}
Week 7 ()
c) {3 8 5 9 4} --> {3 4 8 5 9} --> {3 4 5 8 9} --> {3 4 5 8 9} --> {3 4 5 8 9}
Week 8 () d) {8 3 5 4 9} --> {8 3 4 5 9} --> {3 4 5 8 9}

Y h i

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=73&assessment=156 1/6
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 11 - Week 9

Yes, the answer is correct.


Week 9 () Score: 1
Accepted Answers:
Lecture 41: a) {3 8 5 9 4} --> {3 5 8 9 4} --> {3 4 5 8 9}
Substitution of
# include and 3) Given an array arr = {12, 34, 47, 62, 85, 92, 95, 99,105} and key = 34; what are the mid 1 point
Macro (unit? values (corresponding array elements) generated in the first and second iterations of binary search?
unit=73&lesson=74)
a) 85 and 12
Lecture 42:
"search" as a
b) 85 and 34
function (unit? c) 62 and 34
unit=73&lesson=75)
d) 62 and 47
Lecture 43: Yes, the answer is correct.
Binary Search Score: 1
(unit? Accepted Answers:
unit=73&lesson=76) b) 85 and 34

Lecture 44: 4) Binary Search can be categorized into which of the following? 1 point
Binary Search
(Contd.) (unit? a) Brute Force technique
unit=73&lesson=77)
b) Divide and conquer
Lecture 45: c) Greedy algorithm
Sorting
d) Dynamic programming
Methods (unit?
unit=73&lesson=78) Yes, the answer is correct.
Score: 1
Quiz: Accepted Answers:
Assignment 9 b) Divide and conquer
(assessment?
name=156) 5) Select the code snippet which performs unordered linear search iteratively? 1 point

Feedback For
Week 9 (unit?
unit=73&lesson=79)

Week 10 ()

Week 11 ()

Week 12 ()

Programming
Exam Oct
2021 (First
Session):
(10.00AM -
11.00AM). ()

Programming
Exam Oct
2021(Second

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=73&assessment=156 2/6
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 11 - Week 9

Session):
(8.00PM -
9.00PM). ()

Programming
Exam 2022
(First
Session)
(10am - 11am)
()

Programming
Exam 2022
(Second
Session)
(8pm - 9pm) ()

d) None of the above


Yes, the answer is correct.
Score: 1
Accepted Answers:

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=73&assessment=156 3/6
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 11 - Week 9

6) Consider the array A[]= {5,4,9,1,3} apply the insertion sort to sort the array . Consider 1 point
the cost associated with each sort is 25 rupees, what is the total cost of the insertion sort for sorting
the entire array?

a) 25
b) 50
c) 75
d) 100

Yes, the answer is correct.


Score: 1
Accepted Answers:
c) 75

7) 1 point

a) 0
b) 1

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=73&assessment=156 4/6
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 11 - Week 9

c) 01
d) None of the above

Yes, the answer is correct.


Score: 1
Accepted Answers:
b) 1

8) 1 point

a) 10 10
b) 10 50
c) 50 50
d) Compilation error

Yes, the answer is correct.


Score: 1
Accepted Answers:
d) Compilation error

9) What is the worst case complexity of selection sort? 1 point

Yes, the answer is correct.


Score: 1
Accepted Answers:

10) If the given input array is sorted or nearly sorted, which of the following algorithm gives 1 point
the best performance?

a) Insertion sort

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=73&assessment=156 5/6
8/9/22, 10:48 AM Problem solving through Programming In C - - Unit 11 - Week 9

b) Selection sort
c) Bubble sort
d) Quick sort

Yes, the answer is correct.


Score: 1
Accepted Answers:
a) Insertion sort

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=73&assessment=156 6/6
8/9/22, 10:49 AM Problem solving through Programming In C - - Unit 12 - Week 10

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

getpythoncode@gmail.com 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Problem solving through Programming In C

(course)

Course
outline Assignment 10
The due date for submitting this assignment has passed.
How does an Due on 2021-03-31, 23:59 IST.
NPTEL online
course work?
() Assignment submitted on 2021-03-23, 15:38 IST
Assignment 10
Week 0 :
Assignment 0 1) How can you improve the best-case efficiency in bubble sort? (The input is already 1 point
() sorted)

Week 1 ()

Week 2 ()

Week 3 ()

Week 4 ()

Week 5 ()

Week 6 ()

Week 7 ()

Week 8 ()

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=80&assessment=162 1/8
8/9/22, 10:49 AM Problem solving through Programming In C - - Unit 12 - Week 10

Week 9 ()

Week 10 ()

Lecture 46:
Bubble Sort
(Contd.) (unit?
unit=80&lesson=81)

Lecture 47: Use


of Pointer in
Function :
Context Bubble
Sort (unit?
unit=80&lesson=82)

Lecture 48:
Arrays at
Strings (unit?
unit=80&lesson=83)

Lecture 49:
Data
Representation
(unit?
unit=80&lesson=84)

Lecture 50:
Bisection
Method (unit?
unit=80&lesson=85)

Quiz:
Assignment
10
(assessment?
name=162)

Feedback For
Week 10 (unit?
unit=80&lesson=86)

Week 11 ()

Week 12 ()

Programming
Exam Oct
2021 (First
Session):
(10.00AM -
11.00AM). ()

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=80&assessment=162 2/8
8/9/22, 10:49 AM Problem solving through Programming In C - - Unit 12 - Week 10

Programming
Exam Oct
2021(Second
Session):
(8.00PM -
9.00PM). ()

Programming
Exam 2022
(First
Session)
(10am - 11am)
()

Programming
Exam 2022
(Second
Session)
(8pm - 9pm) ()

Yes, the answer is correct.


Score: 1
Accepted Answers:

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=80&assessment=162 3/8
8/9/22, 10:49 AM Problem solving through Programming In C - - Unit 12 - Week 10

2) Bisection method is used to find 1 point

a) Derivative of a function at a given point


b) Numerical integration of a function within a range
c) Root of a function
d) None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
c) Root of a function

3) In ……………, search starts at the beginning of the list and checks every element in 1 point
the list.

a) Linear search
b) Binary search
c) Hash search
d) Binary tree search

Yes, the answer is correct.


Score: 1
Accepted Answers:
a) Linear search

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=80&assessment=162 4/8
8/9/22, 10:49 AM Problem solving through Programming In C - - Unit 12 - Week 10

4) 1 point

a) 40
b) 30
c) Compilation error
d) Runtime error

Yes, the answer is correct.


Score: 1
Accepted Answers:
b) 30

5)

Hint

Yes, the answer is correct.


Score: 1
Accepted Answers:
(Type: Numeric) 2

1 point

6) What would be the equivalent pointer expression for referring to the array element a[i][j] 1 point
[k][l]?

a) (((*(a+i)+j)+k)+l)

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=80&assessment=162 5/8
8/9/22, 10:49 AM Problem solving through Programming In C - - Unit 12 - Week 10

b) *(*(*(*(a+i)+j)+k)+l)
c) (*(*(a+i)+j)+k+l)
d) *((a+i)+j+k+l)

Yes, the answer is correct.


Score: 1
Accepted Answers:
b) *(*(*(*(a+i)+j)+k)+l)

7) 1 point

a) 23,11
b) 23,23
c) 11,17
d) 17,17

Yes, the answer is correct.


Score: 1
Accepted Answers:
a) 23,11

8) 1 point

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=80&assessment=162 6/8
8/9/22, 10:49 AM Problem solving through Programming In C - - Unit 12 - Week 10

a) 40
b) 80
c) 120
d) 160

Yes, the answer is correct.


Score: 1
Accepted Answers:
b) 80

9)

5,5

Hint

Yes, the answer is correct.


Score: 1
Accepted Answers:
(Type: String) 5,5

1 point

10)

1.0312

Hint

Yes, the answer is correct.


Score: 1
Accepted Answers:

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=80&assessment=162 7/8
8/9/22, 10:49 AM Problem solving through Programming In C - - Unit 12 - Week 10

(Type: Numeric) 1.0312

1 point

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=80&assessment=162 8/8
8/9/22, 10:49 AM Problem solving through Programming In C - - Unit 13 - Week 11

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

getpythoncode@gmail.com 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Problem solving through Programming In C

(course)

Course
outline Assignment 11
The due date for submitting this assignment has passed.
How does an Due on 2021-04-07, 23:59 IST.
NPTEL online
course work?
() Assignment submitted on 2021-03-27, 09:45 IST
1) Interpolation is a process for 1 point
Week 0 :
Assignment 0 a) extracting feasible data set from a given set of data
() b) finding a value between two points on a line or curve.
c) removing unnecessary points from a curve
Week 1 ()
d) all of the mentioned
Week 2 () Yes, the answer is correct.
Score: 1
Week 3 () Accepted Answers:
b) finding a value between two points on a line or curve.
Week 4 () 2) 1 point

Week 5 ()

Week 6 ()

Week 7 ()

Week 8 ()

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=87&assessment=174 1/5
8/9/22, 10:49 AM Problem solving through Programming In C - - Unit 13 - Week 11

Week 9 ()

Week 10 ()

Week 11 ()

Lecture 51 : Yes, the answer is correct.


Interpolation Score: 1
(unit? Accepted Answers:
unit=87&lesson=88)

Lecture 52 :
Trapezoidal
Rule and 3) 1 point
Runge-Kutta
Method (unit?
unit=87&lesson=89)

Lecture 53 :
Recursion
(unit?
unit=87&lesson=90)

Lecture 54 :
Recursion(Contd.) a) 12.78
(unit?
b) 13.08
unit=87&lesson=91)
c) 14.12
Lecture 55 :
d) 11.36
Structure (unit?
unit=87&lesson=92) Yes, the answer is correct.
Score: 1
Quiz: Accepted Answers:
Assignment 11 b) 13.08
(assessment?
name=174) 4)

Feedback For
Week 11 (unit?
unit=87&lesson=93)

22.5962
Week 12 ()

Hint
Programming
Exam Oct
2021 (First Yes, the answer is correct.
Session): Score: 1
(10.00AM - Accepted Answers:
11.00AM). () (Type: Numeric) 22.5962

1 point
Programming
Exam Oct 5) Accuracy of the trapezoidal rule increases when 1 point
2021(Second

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=87&assessment=174 2/5
8/9/22, 10:49 AM Problem solving through Programming In C - - Unit 13 - Week 11

Session): a) integration is carried out for sufficiently large range


(8.00PM -
b) instead of trapezoid, we take rectangular approximation function
9.00PM). ()
c) number of segments are increased
Programming d) integration is performedfor only integer range
Exam 2022
Yes, the answer is correct.
(First Score: 1
Session) Accepted Answers:
(10am - 11am) c) number of segments are increased
()
6) 1 point
Programming
Exam 2022
(Second
Session)
(8pm - 9pm) ()

a) 2.86
b) 2.93
c) 3.13
d) 3.08

Yes, the answer is correct.


Score: 1
Accepted Answers:
b) 2.93

7) 1 point

a) -2.506
b) -2.706
c) -2.406
d) None
Yes, the answer is correct.
Score: 1
Accepted Answers:
b) -2.706

8) 1 point

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=87&assessment=174 3/5
8/9/22, 10:49 AM Problem solving through Programming In C - - Unit 13 - Week 11

a) A-2, B-4, C-1, D-3


b) A-3, B-1, C-2, D-4
c) A-1, B-4, C-3, D-2
d) A-2, B-3, C-4, D-1

Yes, the answer is correct.


Score: 1
Accepted Answers:
a) A-2, B-4, C-1, D-3

9) 1 point

a) 0.53 to 0.56
b) 0.45 to 0.47
c) 0.35 to 0.37
d) 0.41 to 0.43

Yes, the answer is correct.


Score: 1
Accepted Answers:
a) 0.53 to 0.56

10)

Hint

Y h i

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=87&assessment=174 4/5
8/9/22, 10:49 AM Problem solving through Programming In C - - Unit 13 - Week 11

Yes, the answer is correct.


Score: 1
Accepted Answers:
(Type: Numeric) 2

1 point

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=87&assessment=174 5/5
8/9/22, 10:49 AM Problem solving through Programming In C - - Unit 14 - Week 12

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

getpythoncode@gmail.com 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Problem solving through Programming In C

(course)

Course
outline Assignment 12
The due date for submitting this assignment has passed.
How does an Due on 2021-04-14, 23:59 IST.
NPTEL online
course work?
() Assignment submitted on 2021-04-14, 07:46 IST
Assignment 12
Week 0 :
Assignment 0 1) Which of the following are themselves a collection of different data types? 1 point
()
a) String

Week 1 () b) Array
c) Character
Week 2 () d) Structure

Yes, the answer is correct.


Week 3 () Score: 1
Accepted Answers:
Week 4 () d) Structure

Week 5 () 2) Which of the following comments about the usage structures is true? 1 point

a) Storage class can be assigned to individual member


Week 6 ()
b) Individual members can be initialized within a structure type declaration

Week 7 () c) The scope of the member name is confined to the particular structure, within which it is
defined
Week 8 () d) None

Y h i

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=94&assessment=175 1/6
8/9/22, 10:49 AM Problem solving through Programming In C - - Unit 14 - Week 12

Yes, the answer is correct.


Week 9 () Score: 1
Accepted Answers:
Week 10 () c) The scope of the member name is confined to the particular structure, within which it is defined

3) 1 point
Week 11 ()

Week 12 ()

Lecture 56 :
Structure
(Contd.) (unit?
unit=94&lesson=95)

Lecture 57 :
Structure with
typedef (unit?
unit=94&lesson=96)

Lecture 58 :
Pointer (unit?
unit=94&lesson=97)

Lecture 59 :
Pointer (Contd.)
(unit?
unit=94&lesson=98)

Lecture 60 :
Pointer in
Structures
(unit?
unit=94&lesson=99)

Lecture 61 :
Dynamic
Allocation and a) Error
File (unit?
b) 0 1 2 3 4
unit=94&lesson=100)
c) 1 2 3 4 5
Quiz:
d) 0 1 2 2 3
Assignment
12 Yes, the answer is correct.
(assessment? Score: 1
name=175) Accepted Answers:
d) 0 1 2 2 3
Feedback For
Week 12 (unit?
unit=94&lesson=101)

Programming
Exam Oct
2021 (First
Session):

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=94&assessment=175 2/6
8/9/22, 10:49 AM Problem solving through Programming In C - - Unit 14 - Week 12

(10.00AM - 4) 1 point
11.00AM). ()

Programming
Exam Oct
2021(Second
Session):
(8.00PM -
9.00PM). ()

Programming
Exam 2022
(First
Session)
(10am - 11am)
()

Programming
Exam 2022
(Second
Session)
(8pm - 9pm) () a) 5 10 10
b) 10 5 15
c) 10 5 10
d) 10 15 5

Yes, the answer is correct.


Score: 1
Accepted Answers:
c) 10 5 10

5) 1 point

a) 2036 2036 2036


b) 2012 4 2204
c) 2036 10 10
d) 2012 4 6
Y h i

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=94&assessment=175 3/6
8/9/22, 10:49 AM Problem solving through Programming In C - - Unit 14 - Week 12

Yes, the answer is correct.


Score: 1
Accepted Answers:
a) 2036 2036 2036

6) 1 point

a) 2
b) 4
c) 8
d) None

Yes, the answer is correct.


Score: 1
Accepted Answers:
c) 8

7) 1 point

a) 10
b) a
c) address of a
d) compilation error

Y h i

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=94&assessment=175 4/6
8/9/22, 10:49 AM Problem solving through Programming In C - - Unit 14 - Week 12

Yes, the answer is correct.


Score: 1
Accepted Answers:
d) compilation error

8) 1 point

a) 1111011
b) 1111101
c) 1110111
d) 1110011

Yes, the answer is correct.


Score: 1
Accepted Answers:
b) 1111101

9) Calling a function f with a an array variable a[3] where a is an array, is equivalent to 1 point

a) f(a[3])
b) f(*(a + 3))
c) f(3[a])
d) all of the mentioned

Yes, the answer is correct.


Score: 1
Accepted Answers:
d) all of the mentioned

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=94&assessment=175 5/6
8/9/22, 10:49 AM Problem solving through Programming In C - - Unit 14 - Week 12

10) 1 point

a) True
b) False
c) No output
d) Compilation error

No, the answer is incorrect.


Score: 0
Accepted Answers:
a) True

https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=94&assessment=175 6/6

You might also like