Nptel C 2021 Jan To April
Nptel C 2021 Jan To April
(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?
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
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
C
Unix
Java
Python
8) The binary AND operation of the numbers “100101” and “110011” results (in decimal) 1 point
100001
2
33
63
Printer
Mouse
Keyboard
Joystick
10) The process through which an user can find error(s) in a program is called 1 point
Compiling
Searching
Debugging
Processing
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
(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
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
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?
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
(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
Quiz: a) I and II
Assignment 2
(assessment?
b) II and III
name=120) c) I, II and IV
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
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
9) 1 point
a) 9
b) 0
c) 1001
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
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
(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
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
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
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
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
10) 1 point
a. 0
b. 1
c. 7
d. Compilation error
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
(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
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
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
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). ()
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
7) 1 point
8) 1 point
a) NPTEL
b) PROGRAMMING
c) No output
d) Compilation error as A and a are not declared as character variable
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
10) 1 point
a) Choice is 1
b) Choice other than 1
c) Both (a) and (b)
d) Syntax error
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
(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 5 () 2) The loop in which the statements within the loop are executed at least once is called 1 point
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
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
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
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
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
9) 1 point
a) 5,4
b) 7,4
c) 5,6
d) 6,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
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
(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
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) ()
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
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
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
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
(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
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
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
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). ()
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
a) 2268
b) 2120
c) 2224
d) 2144
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
10)
Hint
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
(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 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
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
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
7) 1 point
a) Infinite times
b) 32767
c) 65535
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
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
10) 1 point
a) 89
b) 90
c) 91
d) 92
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
(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
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
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) ()
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
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
8) 1 point
a) 10 10
b) 10 50
c) 50 50
d) Compilation error
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
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
(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 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) ()
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
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
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
5)
Hint
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)
7) 1 point
a) 23,11
b) 23,23
c) 11,17
d) 17,17
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
9)
5,5
Hint
1 point
10)
1.0312
Hint
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
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
(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 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
a) 2.86
b) 2.93
c) 3.13
d) 3.08
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
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
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
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
(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
Week 5 () 2) Which of the following comments about the usage structures is true? 1 point
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
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
5) 1 point
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
6) 1 point
a) 2
b) 4
c) 8
d) None
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
8) 1 point
a) 1111011
b) 1111101
c) 1110111
d) 1110011
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
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
https://onlinecourses.nptel.ac.in/noc21_cs01/unit?unit=94&assessment=175 6/6