0% found this document useful (0 votes)
7 views67 pages

Nptel C 2022 Jan To April

The document outlines the structure and content of the NPTEL course 'Problem Solving Through Programming In C', detailing assignments, quizzes, and accepted answers for various questions related to programming concepts. It includes information on submission statuses and scores for assignments across multiple weeks. The document also highlights key programming definitions and concepts relevant to the course material.

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)
7 views67 pages

Nptel C 2022 Jan To April

The document outlines the structure and content of the NPTEL course 'Problem Solving Through Programming In C', detailing assignments, quizzes, and accepted answers for various questions related to programming concepts. It includes information on submission statuses and scores for assignments across multiple weeks. The document also highlights key programming definitions and concepts relevant to the course material.

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/ 67

8/9/22, 11:06 AM Problem Solving Through Programming In C - - Unit 2 - Week 0 :

Answer Submitted.
X

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

Uploaded [email protected]
youtube.com/c/getpythoncode

Contact me at [email protected]
Telegram id - @Ak4Gp
NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Problem Solving Through Programming In C

(course)

Course
outline Week 0 : Assignment 0
Assignment not submitted
How does an The marks of week 0 assignment will not be consider for evaluation
NPTEL online
course work? 1) Which among the following is the most complete definition of Programming? 1 point
()
Programming is a process to solve any logical problems.

Week 0 : () Programming is a process to solve any numerical problem.


Programming is a process to solve any real life problems.
Practice:
Programming is the process of taking an algorithm and encoding it into a notation (using a
Week 0 :
programming language), so that it can be executed by a computer.
Assignment 0
(assessment? Yes, the answer is correct.
name=124) Score: 1
Accepted Answers:
Week 1 () 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 2 ()
2) Which of the following controls the way in which the computer system works and give 1 point
means by which users can interact with the computer?
Week 3 ()
The motherboard
Week 4 ()
The operating system

Week 5 () The application software


The RAM
Week 6 () Yes, the answer is correct.
Score: 1

A dA

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=16&assessment=124 1/4
8/9/22, 11:06 AM Problem Solving Through Programming In C - - Unit 2 - Week 0 :

Accepted Answers:
Week 7 () The operating system

Week 8 () 3) CPU consists of 1 point

ALU, Control Unit


Week 9 ()
ALU, Main memory, Control Unit
Week 10 () ALU, monitor, Registers
ALU, Control Unit, Hard Disk
Week 11 ()
No, the answer is incorrect.
Score: 0
Week 12 () Accepted Answers:
ALU, Control Unit
Programming
4) C was developed by 1 point
Exam 2022
(First
Alan Turing
Session)
(10am - 11am) Charles Babbage
() Ada Lovelace
Dennis Ritchie
Programming
Yes, the answer is correct.
Exam 2022 Score: 1
(Second
Accepted Answers:
Session) Dennis Ritchie
(8pm - 9pm) ()
5) C is- 1 point
DOWNLOAD
General-purpose programming language
VIDEOS ()
Domain-specific programming language
Books () Page description programming language
None of the above
Text
Transcripts () Yes, the answer is correct.
Score: 1
Accepted Answers:
Live sessions General-purpose programming language
- Solve
sample 6) The relation between bit and byte in digital logic is 1 point
problems
with us () 1 byte = 10 bits
1 byte = 16 bits
1 byte = 8 bits
1 byte = 2 bits

Yes, the answer is correct.


Score: 1
Accepted Answers:
1 byte = 8 bits

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

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=16&assessment=124 2/4
8/9/22, 11:06 AM Problem Solving Through Programming In C - - Unit 2 - Week 0 :

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
No, the answer is incorrect.
Score: 0
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

No, the answer is incorrect.


Score: 0
Accepted Answers:
Debugging

Check Answers and Submit

Your score is: 7/10

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=16&assessment=124 3/4
8/9/22, 11:06 AM Problem Solving Through Programming In C - - Unit 2 - Week 0 :

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=16&assessment=124 4/4
8/9/22, 11:08 AM Problem Solving Through Programming In C - - Unit 3 - Week 1

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

[email protected]

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

(course)

Course
outline Week 1 : Assignment 1
The due date for submitting this assignment has passed.
How does an Due on 2022-02-09, 23:59 IST.
NPTEL online As per our records you have not submitted this assignment.
course work?
() 1) The section of CPU that is responsible for performing mathematical operations is 1 point
known as
Week 0 : ()
a) Memory

Week 1 () b) Register unit


c) ALU-Arithmetic and Logic Unit
Lecture 1 :
d) Control unit
Introduction
(unit? No, the answer is incorrect.
unit=17&lesson=18) Score: 0
Accepted Answers:
Lecture 2: Idea c) ALU-Arithmetic and Logic Unit
of Algorithms
(unit? 2) What type of device is a computer mouse? 1 point
unit=17&lesson=19)
a) Memory
Lecture 3: Flow
b) Output
Chart and
Pseudocode c) Storage
(unit? d) Input
unit=17&lesson=20)
No, the answer is incorrect.
Some Score: 0
corrections in Accepted Answers:
Lecture 3 (unit? d) Input
unit=17&lesson=21)

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=17&assessment=125 1/5
8/9/22, 11:08 AM Problem Solving Through Programming In C - - Unit 3 - Week 1

3) Algorithm is- 1 point


Lecture 4 :
Introduction to
a) A process or set of rules to be followed in calculations or other problem-solving
Programming
operations, especially by a human.
Language
Concepts (unit? b) A process or set of rules to be followed to solve numerical problems only.
unit=17&lesson=22) c) A process or set of rules to be followed in calculations or other problem-solving
Lecture 5 : operations, especially by a computer.
Variables and d) A process or set of rules to be followed in to solve logical problems only.
Memory (unit?
No, the answer is incorrect.
unit=17&lesson=23)
Score: 0
Quiz: Week 1 : Accepted Answers:
Assignment 1 c) A process or set of rules to be followed in calculations or other problem-solving operations,
(assessment? especially by a computer.
name=125)
4) The smallest unit of memory is 1 point
Feedback Form
(unit? a) Byte
unit=17&lesson=129)
b) Bit
Assignment 1 c) Nibble
Solution (unit?
d) Baud
unit=17&lesson=149)
No, the answer is incorrect.
Week 2 () Score: 0
Accepted Answers:
Week 3 () b) Bit

5) 1 point
Week 4 ()

Week 5 ()

Week 6 ()

Week 7 ()

Week 8 ()

Week 9 ()

Week 10 ()

Week 11 ()

Week 12 ()

Programming
Exam 2022
(First
Session) a) 20

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=17&assessment=125 2/5
8/9/22, 11:08 AM Problem Solving Through Programming In C - - Unit 3 - Week 1

(10am - 11am) b) 21
()
c) 10

Programming d) 0.33
Exam 2022 No, the answer is incorrect.
(Second Score: 0
Session) Accepted Answers:
(8pm - 9pm) () b) 21

6) 1 point
DOWNLOAD
VIDEOS ()

Books ()

Text
Transcripts ()

Live sessions
- Solve
sample
problems
with us ()

a) 5040
b) 720
c) 28
d) 21

No, the answer is incorrect.


Score: 0
Accepted Answers:
a) 5040

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=17&assessment=125 3/5
8/9/22, 11:08 AM Problem Solving Through Programming In C - - Unit 3 - Week 1

7) 1 point

a) 1248
b) 88442211
c) 8421
d) 0
No, the answer is incorrect.
Score: 0
Accepted Answers:
c) 8421

8) The section of the CPU that selects, interprets and sees to the execution of program 1 point
instructions

a) Memory
b) Register Unit
c) Control Unit
d) ALU

N h i i

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=17&assessment=125 4/5
8/9/22, 11:08 AM Problem Solving Through Programming In C - - Unit 3 - Week 1

No, the answer is incorrect.


Score: 0
Accepted Answers:
c) Control Unit

9) The ________ scans the entire C program and translates it as a whole into machine 1 point
code.

a) Interpreter
b) Compiler
c) Program counter
d) Operating system

No, the answer is incorrect.


Score: 0
Accepted Answers:
b) Compiler

10) The list of coded instructions is called 1 point

a) Computer Program
b) Algorithm
c) Flow chart
d) Utility instructions

No, the answer is incorrect.


Score: 0
Accepted Answers:
a) Computer Program

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=17&assessment=125 5/5
8/9/22, 11:07 AM Problem Solving Through Programming In C - - Unit 4 - Week 2

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

[email protected]

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

(course)

Course
outline Week 2 : Assignment 2
The due date for submitting this assignment has passed.
How does an Due on 2022-02-09, 23:59 IST.
NPTEL online As per our records you have not submitted this assignment.
course work?
() 1) Which of the following statements is correct? 1 point

a) System software is dependent on application software


Week 0 : ()
b) Application software is dependent on system software
Week 1 () c) Both are independent of each other
d) None of the above.
Week 2 ()
No, the answer is incorrect.
Score: 0
Lecture 6 :
Accepted Answers:
Types of
b) Application software is dependent on system software
Software and
Compilers 2) All keywords in C are in 1 point
(unit?
unit=25&lesson=26) a) LowerCase letters
Lecture 7: b) Upper Case letters
Introduction to c) CamelCase letters
C Programming
d) None of the above
Language
(unit? No, the answer is incorrect.
unit=25&lesson=27) Score: 0
Accepted Answers:
Lecture 8 :
a) LowerCase letters
Variables and
Variable Types 3) Which of the following is not a C variable name? 1 point

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=25&assessment=127 1/4
8/9/22, 11:07 AM Problem Solving Through Programming In C - - Unit 4 - Week 2

in C (unit? a) x123
unit=25&lesson=28)
b) x_123
Lecture 9 :
c) 123x
Introducing
Functions d) _X123
(unit? No, the answer is incorrect.
unit=25&lesson=29) Score: 0
Accepted Answers:
Lecture 10 :
c) 123x
Address and
Content of 4) Variable names beginning with underscore is not encouraged in C. Why? 1 point
Variables and
Types (unit? a) It is not standardized
unit=25&lesson=30)
b) To avoid conflicts since assemblers and loaders use such names
Quiz: Week 2 : c) To avoid conflicts since library routines use such names
Assignment 2
d) To avoid conflicts with environment variables of an operating system
(assessment?
name=127) No, the answer is incorrect.
Score: 0
Feedback Form Accepted Answers:
(unit? c) To avoid conflicts since library routines use such names
unit=25&lesson=137)
5) A function is 1 point
Assignment 2
Solution (unit? a) Block of statements to perform some specific task
unit=25&lesson=150)
b) It is a fundamental modular unit to perform some task
Week 3 () c) It has a name and can be used multiple times
d) All the above statements are true
Week 4 ()
No, the answer is incorrect.
Score: 0
Week 5 () Accepted Answers:
d) All the above statements are true
Week 6 ()
6) In case of ordinary int variables: 1 point
Week 7 ()
a) The leftmost bit is reserved for sign

Week 8 () b) The rightmost bit is reserved for sign


c) No bit is reserved for sign
Week 9 () d) None of the above

No, the answer is incorrect.


Week 10 () Score: 0
Accepted Answers:
Week 11 () a) The leftmost bit is reserved for sign

Week 12 ()

Programming
Exam 2022
(First

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=25&assessment=127 2/4
8/9/22, 11:07 AM Problem Solving Through Programming In C - - Unit 4 - Week 2

Session) 7) 1 point
(10am - 11am)
()

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

DOWNLOAD a) 1
VIDEOS ()
b) 17
c) 19
Books ()
d) 16
Text No, the answer is incorrect.
Transcripts () Score: 0
Accepted Answers:
Live sessions c) 19
- Solve
8) 1 point
sample
problems
with us ()

a) 28.2
b) 21.00
c) 24.00
d) 21.2

No, the answer is incorrect.


Score: 0
Accepted Answers:
c) 24.00

9) A syntax error occurs when 1 point

a) The rules of grammar of the language is violated


b) The statements in the program have no meaning
c) The program gives wrong or undesired output

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=25&assessment=127 3/4
8/9/22, 11:07 AM Problem Solving Through Programming In C - - Unit 4 - Week 2

d) Some illegal operation (e.g. divide by zero) is done

No, the answer is incorrect.


Score: 0
Accepted Answers:
a) The rules of grammar of the language is violated

10)

Hint

No, the answer is incorrect.


Score: 0
Accepted Answers:
String Exact Match (Ignore symbols): 10

1 point

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=25&assessment=127 4/4
8/9/22, 11:09 AM Problem Solving Through Programming In C - - Unit 5 - Week 3

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

[email protected]

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

(course)

Course
outline Week 3: Assignment 3
The due date for submitting this assignment has passed.
How does an Due on 2022-02-16, 23:59 IST.
NPTEL online As per our records you have not submitted this assignment.
course work?
() 1) Which of the following statement is correct? 1 point

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


Week 0 : ()
more than one operator with different precedence. Associativity is used when two operators of
same precedence appear in an expression
Week 1 ()
b) Operator associativity determines which operator is performed first in an expression with
Week 2 () more than one operator with different associativity. Precedence is used when two operators of
same precedence appear in an expression
Week 3 () c) Operator precedence and associativity are same.
d) None of the above
Lecture 11 :
Assignment No, the answer is incorrect.
Statement and
Score: 0
Operators in C Accepted Answers:
(unit? a) Operator precedence determines which operator is performed first in an expression with more
unit=32&lesson=33) than one operator with different precedence. Associativity is used when two operators of same
precedence appear in an expression
Lecture 12 :
Arithmetic
Expressions
and Relational
Expressions
(unit?
unit=32&lesson=34)

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=32&assessment=130 1/6
8/9/22, 11:09 AM Problem Solving Through Programming In C - - Unit 5 - Week 3

Lecture 13 : 2) 1 point
Logical
Operators and
Change in
Control Flow
(unit?
unit=32&lesson=35)

Lecture 14 :
Use of Logical
Operators in
Branching
(unit?
unit=32&lesson=36)
a) Value of z and w are 1 and 2 respectively
Lecture 15 :
Branching : IF - b) Value of z and w are 1 and 2.200000 respectively
ELSE c) Value of z and w are 1.000000 and 2.200000 respectively
Statement
d) Value of z and w are 1 and 2.000000 respectively
(unit?
unit=32&lesson=37) No, the answer is incorrect.
Score: 0
Quiz: Week 3: Accepted Answers:
Assignment 3 d) Value of z and w are 1 and 2.000000 respectively
(assessment?
name=130) 3) 1 point

Week-03:
Program-01
(/noc22_cs45/progassignment?
name=131)

Week-03:
Program-02
(/noc22_cs45/progassignment?
name=132)

Week-03:
Program-03
(/noc22_cs45/progassignment?
name=133) a) TRUE
Week-03: b) FALSE
Program-04 c) Syntax Error
(/noc22_cs45/progassignment?
name=134)
d) Compilation Error

No, the answer is incorrect.


Feedback For Score: 0
Week 3 (unit?
Accepted Answers:
unit=32&lesson=38)
b) FALSE
Assignment 3
Solution (unit?
unit=32&lesson=151)

Week 4 ()

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=32&assessment=130 2/6
8/9/22, 11:09 AM Problem Solving Through Programming In C - - Unit 5 - Week 3

4) 1 point
Week 5 ()

Week 6 ()

Week 7 ()

Week 8 ()
a) x= 60
Week 9 ()
b) x= 70

Week 10 () c) x= 0
d) x= 1
Week 11 () No, the answer is incorrect.
Score: 0
Week 12 () Accepted Answers:
d) x= 1
Programming
5) 1 point
Exam 2022
(First
Session)
(10am - 11am)
()

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

DOWNLOAD
VIDEOS ()
a) 17
Books () b) 18
c) 1
Text
d) 0
Transcripts ()
No, the answer is incorrect.
Live sessions Score: 0
- Solve Accepted Answers:
sample a) 17
problems
with us ()

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=32&assessment=130 3/6
8/9/22, 11:09 AM Problem Solving Through Programming In C - - Unit 5 - Week 3

6) 1 point

a) 7
b) 6
c) 5
d) 0

No, the answer is incorrect.


Score: 0
Accepted Answers:
b) 6

7) 1 point

a) 0
b) 1
c) 2
d) Compilation error

No, the answer is incorrect.


Score: 0
Accepted Answers:
c) 2

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=32&assessment=130 4/6
8/9/22, 11:09 AM Problem Solving Through Programming In C - - Unit 5 - Week 3

8) 1 point

a) 1,2
b) 0,0
c) 3,2
d) 1,0

No, the answer is incorrect.


Score: 0
Accepted Answers:
a) 1,2

9) 1 point

a) IITKGP
b) IITMIITR
c) IITM
IITR
d) IITKGP
IITR

No, the answer is incorrect.


Score: 0
Accepted Answers:
c) IITM
IITR

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=32&assessment=130 5/6
8/9/22, 11:09 AM Problem Solving Through Programming In C - - Unit 5 - Week 3

10) 1 point

a) inside if
b) inside elseif
c) inside if
inside elseif
d) compile time error
No, the answer is incorrect.
Score: 0
Accepted Answers:
a) inside if

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=32&assessment=130 6/6
8/9/22, 11:09 AM Problem Solving Through Programming In C - - Unit 6 - Week 4

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

[email protected]

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

(course)

Course
outline Week 4: Assignment 4
The due date for submitting this assignment has passed.
How does an Due on 2022-02-23, 23:59 IST.
NPTEL online As per our records you have not submitted this assignment.
course work?
() 1) In the C program, '&' is used in 'scanf' to indicate 1 point

a) AND operation
Week 0 : ()
b) Memory location
Week 1 () c) Value of the variable
d) Value at the memory location.
Week 2 ()
No, the answer is incorrect.
Score: 0
Week 3 () Accepted Answers:
b) Memory location
Week 4 ()
2) The control/conditional statements used in C is/are 1 point
Lecture 16: IF-
ELSE a) if-else statements
Statement b) switch statements
(Contd.) (unit?
c) Both (a) and (b)
unit=39&lesson=40)
d) None of these
Lecture 17:
Switch
No, the answer is incorrect.
Score: 0
statement
Accepted Answers:
(unit?
c) Both (a) and (b)
unit=39&lesson=41)
3) What is the other statement that can avoid multiple nested if conditions? 1 point

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=39&assessment=139 1/5
8/9/22, 11:09 AM Problem Solving Through Programming In C - - Unit 6 - Week 4

Lecture 18: a) Functions


Switch
b) Switch statements
Statement
(Contd.) and c) If-else statements with 'break'
Introduction to d) Loop statements
Loops (unit?
No, the answer is incorrect.
unit=39&lesson=42)
Score: 0
Lecture 19: Accepted Answers:
Implementing b) Switch statements
Repetitions
4) The loop which is executed at least one is 1 point
(Loops) (unit?
unit=39&lesson=43)
a) while
Lecture 20: b) do-while
Implementation
c) for
of Loops with
for Statement d) none of the above
(Contd.) (unit?
No, the answer is incorrect.
unit=39&lesson=44) Score: 0
Quiz: Week 4:
Accepted Answers:
Assignment 4
b) do-while
(assessment?
5) if (a == 1||b == 2){} can be written as: 1 point
name=139)

Week-04:
a) if (a == 1)
Program-01 if (b == 2){}
(/noc22_cs45/progassignment? b) if (a == 1){}
name=140) if (b == 2){}
Week-04: c) if (a == 1){}
Program-02 else if (b == 2){}
(/noc22_cs45/progassignment?
d) none of the mentioned
name=141)
No, the answer is incorrect.
Week-04 Score: 0
Program-03 Accepted Answers:
(/noc22_cs45/progassignment?
a) if (a == 1)
name=143) if (b == 2){}
Week-04
6) 1 point
Program-04
(/noc22_cs45/progassignment?
name=142)

Feedback For
Week 4 (unit?
unit=39&lesson=45)

Assignment 4
Solution (unit?
unit=39&lesson=163)
a) 5
Week 5 () b) 1

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=39&assessment=139 2/5
8/9/22, 11:09 AM Problem Solving Through Programming In C - - Unit 6 - Week 4

Week 6 () c) 0
d) None of these
Week 7 ()
No, the answer is incorrect.
Score: 0
Week 8 ()
Accepted Answers:
b) 1
Week 9 ()
7) 1 point
Week 10 ()

Week 11 ()

Week 12 ()

Programming
Exam 2022
(First
Session)
(10am - 11am)
() a) It's perfectly fine
b) It will print both statements
Programming c) It will give a compilation error
Exam 2022
d) More information required
(Second
Session) No, the answer is incorrect.
(8pm - 9pm) () Score: 0
Accepted Answers:
c) It will give a compilation error
DOWNLOAD
VIDEOS () 8) 1 point

Books ()

Text
Transcripts ()

Live sessions
- Solve
sample
problems
with us ()

a) 5 5.600000
b) 6 5.600000
c) 5 6 0 5.600000

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=39&assessment=139 3/5
8/9/22, 11:09 AM Problem Solving Through Programming In C - - Unit 6 - Week 4

d) Complier error

No, the answer is incorrect.


Score: 0
Accepted Answers:
d) Complier error

9) 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

No, the answer is incorrect.


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

10) 1 point

a) true
b) false
c) 0
d) 1

No, the answer is incorrect.


Score: 0
Accepted Answers:
b) false

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=39&assessment=139 4/5
8/9/22, 11:09 AM Problem Solving Through Programming In C - - Unit 6 - Week 4

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=39&assessment=139 5/5
8/9/22, 11:10 AM Problem Solving Through Programming In C - - Unit 7 - Week 5

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

[email protected]

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

(course)

Course
outline Week 5 : Assignment 5
The due date for submitting this assignment has passed.
How does an Due on 2022-03-02, 23:59 IST.
NPTEL online As per our records you have not submitted this assignment.
course work?
() 1) Continue statement used 1 point

a) to continue to the next line of code


Week 0 : ()
b) to debug
Week 1 () c) to stop the current iteration and begin the next iteration from the beginning
d) None of the above statements are correct
Week 2 ()
No, the answer is incorrect.
Score: 0
Week 3 () Accepted Answers:
c) to stop the current iteration and begin the next iteration from the beginning
Week 4 ()

Week 5 ()

Lecture 21: For


Statement
(Contd.) (unit?
unit=46&lesson=47)

Lecture 22:
Example of If-
Else (unit?
unit=46&lesson=48)

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=46&assessment=148 1/7
8/9/22, 11:10 AM Problem Solving Through Programming In C - - Unit 7 - Week 5

Lecture 23 : 2) 1 point
Example of
Loops (unit?
unit=46&lesson=49)

Lecture 24 :
Example of
Loops (Contd.)
(unit?
unit=46&lesson=50)

Lecture 25 :
Example of
Loops (Contd.),
Use of FOR
Loops (unit?
a) Condition is true
unit=46&lesson=51)
b) Condition is false
Quiz: Week 5 :
c) Compilation Error
Assignment 5
(assessment? d) No output possible
name=148)
No, the answer is incorrect.
Score: 0
Week-05
Accepted Answers:
Problem-01
a) Condition is true
(/noc22_cs45/progassignment?
name=152) 3) 1 point
Week-05
Problem-02
(/noc22_cs45/progassignment?
name=153)

Week-05
Program-03
(/noc22_cs45/progassignment?
name=155)

Week-05
Program-04
(/noc22_cs45/progassignment?
name=154)

Feedback For
Week 5 (unit?
a) 4,5
unit=46&lesson=52) b) 4,4

Feedback Form c) 5,5


(unit? d) 0,0
unit=46&lesson=169)
No, the answer is incorrect.
Assignment 5 Score: 0
Solution (unit? Accepted Answers:
unit=46&lesson=171) c) 5,5

Week 6 ()

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=46&assessment=148 2/7
8/9/22, 11:10 AM Problem Solving Through Programming In C - - Unit 7 - Week 5

4) 1 point
Week 7 ()

Week 8 ()

Week 9 ()

Week 10 ()

Week 11 ()

Week 12 ()

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

Programming
Exam 2022 a) IIT Delhi
(Second b) IIT Kharagpur
Session) c) IIT Madras
(8pm - 9pm) ()
d) IIT Guwahati

DOWNLOAD No, the answer is incorrect.


VIDEOS () Score: 0
Accepted Answers:
c) IIT Madras
Books ()
5) 1 point
Text
Transcripts ()

Live sessions
- Solve
sample
problems
with us ()

a) 0
b) 1
c) No output

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=46&assessment=148 3/7
8/9/22, 11:10 AM Problem Solving Through Programming In C - - Unit 7 - Week 5

d) Compiler error

No, the answer is incorrect.


Score: 0
Accepted Answers:
d) Compiler error

6) 1 point

a) 0 1 2 … 9
b) 0 1 2 … 10
c) 1 2 3 … 9
d) 1 2 3 … 10

No, the answer is incorrect.


Score: 0
Accepted Answers:
d) 1 2 3 … 10

7) 1 point

a) 5,4
b) 7,4

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=46&assessment=148 4/7
8/9/22, 11:10 AM Problem Solving Through Programming In C - - Unit 7 - Week 5

c) 5,6
d) 6,4

No, the answer is incorrect.


Score: 0
Accepted Answers:
b) 7,4

8) 1 point

a) 0 1 2 3 4 5 6 7 8 9 11 12…..infinite times
b) 1 2 3 4 5 6 7 8 9 11 12….infinite times
c) Nothing will be printed
d) Compilation Error

No, the answer is incorrect.


Score: 0
Accepted Answers:
c) Nothing will be printed

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=46&assessment=148 5/7
8/9/22, 11:10 AM Problem Solving Through Programming In C - - Unit 7 - Week 5

9) 1 point

a) After loop x=1


b) 1
After loop x=2
c) 1 2
After loop x=3
d) After loop x=3

No, the answer is incorrect.


Score: 0
Accepted Answers:
d) After loop x=3

10) 1 point

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

N h i i

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=46&assessment=148 6/7
8/9/22, 11:10 AM Problem Solving Through Programming In C - - Unit 7 - Week 5

No, the answer is incorrect.


Score: 0
Accepted Answers:
c) 3

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=46&assessment=148 7/7
8/9/22, 11:10 AM Problem Solving Through Programming In C - - Unit 8 - Week 6

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

[email protected]

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

(course)

Course
outline Week 6 Assignment 6
The due date for submitting this assignment has passed.
How does an Due on 2022-03-09, 23:59 IST.
NPTEL online As per our records you have not submitted this assignment.
course work?
() 1) Which of the following is correct statement to access 5th element in a array arr[] of size 1 point
50?
Week 0 : ()
a) arr[5]

Week 1 () b) arr[4]
c) arr{5}
Week 2 () d) arr{4}

No, the answer is incorrect.


Week 3 () Score: 0
Accepted Answers:
Week 4 () b) arr[4]

2) Which statement is correct? 1 point


Week 5 ()

a) An index or subscript in array is a positive integer


Week 6 ()
b) An index or subscript in array is a positive or negative integer
Lecture 26: c) An index or subscript in array is a real number
Introduction to
d) none of the above statement are correct
Arrays (unit?
unit=53&lesson=54) No, the answer is incorrect.
Score: 0
Lecture 27: Accepted Answers:
Arrays (Contd.) a) An index or subscript in array is a positive integer

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=53&assessment=158 1/5
8/9/22, 11:10 AM Problem Solving Through Programming In C - - Unit 8 - Week 6

(unit? 3) 1 point
unit=53&lesson=55)

Lecture 28:
Arrays (Contd.)
(unit?
unit=53&lesson=56)

Lecture 29:
Program using
Arrays (unit?
unit=53&lesson=57)

Lecture 30:
Array Problem
(unit?
unit=53&lesson=58)

Quiz: Week 6
Assignment 6
(assessment?
name=158) a) 20 12 14
b) 10 20 14
Week-06
Program-01 c) 10 12 20
(/noc22_cs45/progassignment? d) Compiler error
name=159)
No, the answer is incorrect.
Week-06 Score: 0
Program-02 Accepted Answers:
b) 10 20 14
(/noc22_cs45/progassignment?
name=160)
4) An integer array (An integer takes two bytes of memory) of size 15 is declared in a C 1 point
Week-06 program. The memory location of the first byte of the array is 2000. What will be the location of the
Program-03 13th element of the array?
(/noc22_cs45/progassignment?
name=161) a) 2013
Week-06 b) 2024
Program-04 c) 2026
(/noc22_cs45/progassignment?
name=162)
d) 2030

No, the answer is incorrect.


Feedback For
Score: 0
Week 6 (unit?
Accepted Answers:
unit=53&lesson=59)
b) 2024
Assignment 6
5) To compare two arrays, we can do it by using 1 point
Solution (unit?
unit=53&lesson=174)
a) comparison operator ‘==’ directly on arrays
Week 7 () b) ' switch case'
c) 'for' loop
Week 8 () d) 'ternary operator' on arrays

No, the answer is incorrect.


Week 9 ()
Score: 0
A dA

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=53&assessment=158 2/5
8/9/22, 11:10 AM Problem Solving Through Programming In C - - Unit 8 - Week 6

Accepted Answers:
Week 10 () c) 'for' loop

6)
Week 11 ()

Week 12 ()

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

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

DOWNLOAD
VIDEOS ()

Books ()

Text
Hint
Transcripts ()

No, the answer is incorrect.


Live sessions Score: 0
- Solve Accepted Answers:
sample (Type: Numeric) 6
problems
with us () 1 point

7) 0 points

a) 3
b) 4
c) No output
d) Compilation error

N h i i

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=53&assessment=158 3/5
8/9/22, 11:10 AM Problem Solving Through Programming In C - - Unit 8 - Week 6

No, the answer is incorrect.


Score: 0
Accepted Answers:
d) Compilation error

8) 1 point

a) Garbage Value
b) 0
c) 5
d) 6

No, the answer is incorrect.


Score: 0
Accepted Answers:
b) 0

9) 1 point

a) 1 followed by two garbage values


b) 1 1 1
c) 1 0 0
d) 0 0 0

No, the answer is incorrect.


Score: 0
Accepted Answers:
c) 1 0 0

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=53&assessment=158 4/5
8/9/22, 11:10 AM Problem Solving Through Programming In C - - Unit 8 - Week 6

10) 1 point

a) IIT KGP
b) IIT MADRAS
c) Compilation error
d) Nothing is printed

No, the answer is incorrect.


Score: 0
Accepted Answers:
b) IIT MADRAS

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=53&assessment=158 5/5
8/9/22, 11:10 AM Problem Solving Through Programming In C - - Unit 9 - Week 7

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

[email protected]

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

(course)

Course
outline Week 7: Assignment 7
The due date for submitting this assignment has passed.
How does an Due on 2022-03-16, 23:59 IST.
NPTEL online As per our records you have not submitted this assignment.
course work?
() 1) Which of the following statements are correct? 1 point
i) A string is a collection of characters terminated by '\0'.
Week 0 : () ii) The format specifier %s is used to print a string.
iii) The length of the string can be obtained by strlen().
Week 1 () iv) The pointer cannot work on string

a) i,ii
Week 2 ()
b) i,ii,iii
Week 3 () c) ii,iv
d) i,iii
Week 4 ()
No, the answer is incorrect.
Score: 0
Week 5 () Accepted Answers:
b) i,ii,iii
Week 6 ()
2) The right method of initializing a 2D array is 1 point

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

Lecture 31 : b) int abc[][] = {1, 2, 3 ,4 }


Linear Search c) int abc[2][] = {1, 2, 3 ,4 }
(unit?
d) all of the above
unit=60&lesson=61)

N h i i

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=60&assessment=165 1/6
8/9/22, 11:10 AM Problem Solving Through Programming In C - - Unit 9 - Week 7

No, the answer is incorrect.


Lecture 32 :
Score: 0
Character Array
Accepted Answers:
and Strings
a) int abc[2][2] = {1, 2, 3 ,4 }
(unit?
unit=60&lesson=62) 3) The array passed as an argument to a function is interpreted as 1 point
Lecture 33 :
a) Address of all the elements in an array
String
Operations b) Value of the first element of the array
(unit? c) Address of the first element of the array
unit=60&lesson=63)
d) Number of elements of the array
Lecture 34 : 2-
No, the answer is incorrect.
D Array Score: 0
Operation
Accepted Answers:
(unit? c) Address of the first element of the array
unit=60&lesson=64)
4)
Lecture 35 :
Introducing
Functions
(unit?
unit=60&lesson=65)

Quiz: Week 7:
Assignment 7
(assessment?
name=165)

Week-07:
Program-01
(/noc22_cs45/progassignment?
name=166) Hint

Week-07
Program-02 No, the answer is incorrect.
Score: 0
(/noc22_cs45/progassignment?
name=167)
Accepted Answers:
(Type: Numeric) 15
Week-07
Program-03 1 point
(/noc22_cs45/progassignment?
5) 1 point
name=168)

Week-07
Program-04
(/noc22_cs45/progassignment?
name=170)

Feedback For
Week 7 (unit?
unit=60&lesson=66)

Assignment 7
Solution (unit?
unit=60&lesson=185)

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=60&assessment=165 2/6
8/9/22, 11:10 AM Problem Solving Through Programming In C - - Unit 9 - Week 7

Week 8 ()

Week 9 ()

Week 10 ()

Week 11 ()

Week 12 ()

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

DOWNLOAD 6)
VIDEOS ()

Books ()

Text
Transcripts ()

Live sessions
- Solve
sample
problems
with us ()
Hint

No, the answer is incorrect.


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

1 point

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=60&assessment=165 3/6
8/9/22, 11:10 AM Problem Solving Through Programming In C - - Unit 9 - Week 7

7) 1 point

a) gnirts
b) gnirt
c) string
d) no output is printed

No, the answer is incorrect.


Score: 0
Accepted Answers:
d) no output is printed

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=60&assessment=165 4/6
8/9/22, 11:10 AM Problem Solving Through Programming In C - - Unit 9 - Week 7

8) 1 point

a) str1 is Swayam, str2 is 2022


b) str1 is 2022, str2 is Swayam
c) str1 is Swayam, str2 is Swayam
d) str1 is 2022, str2 is 2022

No, the answer is incorrect.


Score: 0
Accepted Answers:
a) str1 is Swayam, str2 is 2022

9) 1 point

a) arr
b) arr+5
c) arr+6
d) Not possible

N h i i

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=60&assessment=165 5/6
8/9/22, 11:10 AM Problem Solving Through Programming In C - - Unit 9 - Week 7

No, the answer is incorrect.


Score: 0
Accepted Answers:
c) arr+6

10) If the starting address of an float array Arr[10][10] is 2000, what would be the memory 1 point
address of the element Arr[5][6]? (float takes 4 bytes of memory)

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

No, the answer is incorrect.


Score: 0
Accepted Answers:
c) 2224

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=60&assessment=165 6/6
8/9/22, 11:11 AM Problem Solving Through Programming In C - - Unit 10 - Week 8

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

[email protected]

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

(course)

Course
outline Week 8: Assignment 8
The due date for submitting this assignment has passed.
How does an Due on 2022-03-23, 23:59 IST.
NPTEL online As per our records you have not submitted this assignment.
course work?
() 1) A function prototype is used for 1 point

a) Declaring the function logic


Week 0 : ()
b) Calling the function from the main body
Week 1 () c) Telling the compiler, the kind of arguments used in the function
d) Telling the user for proper use of syntax while calling the function
Week 2 ()
No, the answer is incorrect.
Score: 0
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 ()

Lecture 36:
More on
Functions

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=67&assessment=173 1/6
8/9/22, 11:11 AM Problem Solving Through Programming In C - - Unit 10 - Week 8

(unit? 2) 1 point
unit=67&lesson=68)

Lecture 37:
Function
(Contd.) (unit?
unit=67&lesson=69)

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

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

Week-08
Program-01
(/noc22_cs45/progassignment?
name=175)

Week-08
Program-02
(/noc22_cs45/progassignment?
name=178)

Week-08
Program-03
a) Error: Return statement cannot be used with conditional operators
(/noc22_cs45/progassignment?
name=177) b) Error: Prototype declaration

Week-08
c) Error: Two return statements cannot be used in any function
Program-04 d) No error
(/noc22_cs45/progassignment?
No, the answer is incorrect.
name=179) Score: 0
Accepted Answers:

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=67&assessment=173 2/6
8/9/22, 11:11 AM Problem Solving Through Programming In C - - Unit 10 - Week 8

Feedback For a) Error: Return statement cannot be used with conditional operators
Week 8 (unit?
4) 1 point
unit=67&lesson=73)

Assignment 8
Solution (unit?
unit=67&lesson=189)

Week 9 ()

Week 10 ()

Week 11 ()

Week 12 ()

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

Programming
Exam 2022
(Second a) Result is=27.08
Session) b) Result is=27.083334
(8pm - 9pm) ()
c) Compiler error as result is declared twice
d) Error: Invalid prototype declaration
DOWNLOAD
VIDEOS () No, the answer is incorrect.
Score: 0
Books () Accepted Answers:
a) Result is=27.08

Text 5) 1 point
Transcripts ()

Live sessions
- Solve
sample
problems
with us ()

a) 6 times
b) 25 times
c) 12 times
d) Infinite times

N h i i

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=67&assessment=173 3/6
8/9/22, 11:11 AM Problem Solving Through Programming In C - - Unit 10 - Week 8

No, the answer is incorrect.


Score: 0
Accepted Answers:
b) 25 times

6) 1 point

a) 25
b) 5
c) 15
d) 10

No, the answer is incorrect.


Score: 0
Accepted Answers:
c) 15

7) 1 point

a) 70
b) Garbage value
c) Compilation error
d) None
N h i i

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=67&assessment=173 4/6
8/9/22, 11:11 AM Problem Solving Through Programming In C - - Unit 10 - Week 8

No, the answer is incorrect.


Score: 0
Accepted Answers:
c) Compilation error

8) 1 point

a) 5
b) 8
c) 9
d) 20

No, the answer is incorrect.


Score: 0
Accepted Answers:
c) 9

9) 1 point

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

No, the answer is incorrect.


Score: 0
Accepted Answers:
c) 91

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=67&assessment=173 5/6
8/9/22, 11:11 AM Problem Solving Through Programming In C - - Unit 10 - Week 8

10) 1 point

a) 9
b) 8
c) 0
d) 10

No, the answer is incorrect.


Score: 0
Accepted Answers:
a) 9

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=67&assessment=173 6/6
8/9/22, 11:11 AM Problem Solving Through Programming In C - - Unit 11 - Week 9

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

[email protected]

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

(course)

Course
outline Week 9: Assignment 9
The due date for submitting this assignment has passed.
How does an Due on 2022-03-30, 23:59 IST.
NPTEL online As per our records you have not submitted this assignment.
course work?
() 1) What is the worst-case complexity of selection sort? 1 point

a) O(nlogn)
Week 0 : ()
b) O(logn)
Week 1 () c) O(n)

Week 2 ()
No, the answer is incorrect.
Score: 0
Week 3 ()
Accepted Answers:

Week 4 ()
2) What is the correct order of insertion sort (in ascending order) of the array arr[5]={8 3 5 1 point
Week 5 () 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}
{8 3 5 4 9}-->{8 3 4 5 9}-->{3 4 5 8 9}
Week 8 ()
No, the answer is incorrect.
Score: 0
Week 9 ()
Accepted Answers:
a) {3 8 5 9 4}--> {3 5 8 9 4}-->(3 4 5 8 9}

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=74&assessment=180 1/6
8/9/22, 11:11 AM Problem Solving Through Programming In C - - Unit 11 - Week 9

Lecture 41: 3) When the Binary search is best applied to an array? 1 point
Substitution of
# include and a) For very large size array
Macro (unit? b) When the array is sorted
unit=74&lesson=75)
c) When the array elements are mixed data type
Lecture 42: d) When the array is unsorted
"search" as a
No, the answer is incorrect.
function (unit?
Score: 0
unit=74&lesson=76)
Accepted Answers:
Lecture 43: b) When the array is sorted
Binary Search
4) Select the code snippet which performs unordered linear search iteratively? 1 point
(unit?
unit=74&lesson=77)

Lecture 44:
Binary Search
(Contd.) (unit?
unit=74&lesson=78)

Lecture 45:
Sorting
Methods (unit?
unit=74&lesson=79)

Quiz: Week 9:
Assignment 9
(assessment?
name=180)

Week-09
Program-01
(/noc22_cs45/progassignment?
name=181)

Week-09
Program-02
(/noc22_cs45/progassignment?
name=182)

Week-09
Program-03
(/noc22_cs45/progassignment?
name=183)

Week-09
Program-04
(/noc22_cs45/progassignment?
name=184)

Feedback For
Week 9 (unit?
unit=74&lesson=80)

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=74&assessment=180 2/6
8/9/22, 11:11 AM Problem Solving Through Programming In C - - Unit 11 - Week 9

Assignment 9
Solution (unit?
unit=74&lesson=196)

Week 10 ()

Week 11 ()

Week 12 ()

Programming
Exam 2022
(First
Session)
(10am - 11am) d) None of the above
()
No, the answer is incorrect.
Score: 0
Programming Accepted Answers:
Exam 2022
(Second
Session)
(8pm - 9pm) ()

DOWNLOAD
VIDEOS ()

Books ()

Text
Transcripts ()

Live sessions
- Solve 5) What is the best case and worst case complexity of ordered linear search? 1 point
sample
problems a) O(nlogn), O(logn)
with us ()
b) O(logn), O(nlogn)
c) O(n), O(1)
d) O(1), O(n)

No, the answer is incorrect.


Score: 0
Accepted Answers:
d) O(1), O(n)

6) Given an array arr = {45, 77, 89, 91, 94, 98, 100} and key = 100; what are the mid 1 point
values (corresponding array elements) generated in the first and second iterations?

a) 91 and 98
b) 91 and 100

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=74&assessment=180 3/6
8/9/22, 11:11 AM Problem Solving Through Programming In C - - Unit 11 - Week 9

c) 89 and 94
d) 94 and 98

No, the answer is incorrect.


Score: 0
Accepted Answers:
a) 91 and 98

7) Binary Search can be categorized into which of the following? 1 point

a) Brute Force technique


b) Divide and conquer
c) Greedy algorithm
d) Dynamic programming

No, the answer is incorrect.


Score: 0
Accepted Answers:
b) Divide and conquer

8) 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 when
element 1 reaches the first position of the array?

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

No, the answer is incorrect.


Score: 0
Accepted Answers:
b) 50

9) Select the appropriate pseudo code that performs selection sort 1 point

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=74&assessment=180 4/6
8/9/22, 11:11 AM Problem Solving Through Programming In C - - Unit 11 - Week 9

No, the answer is incorrect.


Score: 0
Accepted Answers:

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=74&assessment=180 5/6
8/9/22, 11:11 AM Problem Solving Through Programming In C - - Unit 11 - Week 9

10) 1 point

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

No, the answer is incorrect.


Score: 0
Accepted Answers:
c) 4, 4

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=74&assessment=180 6/6
8/9/22, 11:12 AM Problem Solving Through Programming In C - - Unit 12 - Week 10

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

[email protected]

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

(course)

Course
outline Week 10: Assignment 10
The due date for submitting this assignment has passed.
How does an Due on 2022-04-06, 23:59 IST.
NPTEL online As per our records you have not submitted this assignment.
course work?
() 1) The bisection method is used to find 1 point

a) Derivative of a function at a given point


Week 0 : ()
b) Numerical integration of a function within a range
Week 1 () c) The root of the function
d) None of the above
Week 2 ()
No, the answer is incorrect.
Score: 0
Week 3 () Accepted Answers:
c) The root of the function
Week 4 ()
2) In __________ , the search starts at the beginning of the list and checks every element 1 point
in the list.
Week 5 ()

a) Linear search
Week 6 ()
b) Binary search

Week 7 () c) Hash search


d) Binary tree search
Week 8 ()
No, the answer is incorrect.
Score: 0
Week 9 () Accepted Answers:
a) Linear search

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=81&assessment=190 1/4
8/9/22, 11:12 AM Problem Solving Through Programming In C - - Unit 12 - Week 10

3) What is the advantage of a recursive approach over an iterative approach? 1 point


Week 10 ()
a) Consumes less memory
Lecture 46:
Bubble Sort b) Less code and easy to implement
(Contd.) (unit? c) Consumes more memory
unit=81&lesson=82)
d) More code has to be written
Lecture 47: Use No, the answer is incorrect.
of Pointer in Score: 0
Function : Accepted Answers:
Context Bubble b) Less code and easy to implement
Sort (unit?
unit=81&lesson=83) 4) Which of the following is not an application of binary search? 1 point

Lecture 48: a) To find the lower/upper bound in an ordered sequence


Arrays at
b) Union of intervals
Strings (unit?
unit=81&lesson=84) c) Debugging
d) To search an unordered list
Lecture 49:
Data No, the answer is incorrect.
Representation Score: 0
(unit? Accepted Answers:
unit=81&lesson=85) d) To search an unordered list

Lecture 50: 5) 1 point


Bisection
Method (unit?
unit=81&lesson=86)

Quiz: Week
10: a) 0.655
Assignment b) 0.665
10
c) 0.565
(assessment?
name=190) d) 0.656

Week-10 No, the answer is incorrect.


Score: 0
Problem-01
Accepted Answers:
(/noc22_cs45/progassignment?
name=191) c) 0.565

Week-10 6) What would be the equivalent pointer expression for referring to the array element a[i][j] 1 point
Problem-02 [k][l]?
(/noc22_cs45/progassignment?
name=192) a) (((*(a+i)+j)+k)+l)
b) *(*(*(*(a+i)+j)+k)+l)
Week-10
Program-03 c) (*(*(a+i)+j)+k+l)
(/noc22_cs45/progassignment? d) *((a+i)+j+k+l)
name=194)
No, the answer is incorrect.
Week-10 Score: 0
Program-04 Accepted Answers:
b) *(*(*(*(a+i)+j)+k)+l)

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=81&assessment=190 2/4
8/9/22, 11:12 AM Problem Solving Through Programming In C - - Unit 12 - Week 10

(/noc22_cs45/progassignment?
7) 1 point
name=193)

Feedback For
Week 10 (unit?
unit=81&lesson=87)

Assignment 10
Solution (unit?
unit=81&lesson=213)

Week 11 ()

Week 12 ()

Programming a) 23, 11
Exam 2022 b) 23, 23
(First
c) 11, 17
Session)
(10am - 11am) d) 17, 17
() No, the answer is incorrect.
Score: 0
Programming Accepted Answers:
Exam 2022 a) 23, 11
(Second
8)
Session)
(8pm - 9pm) ()

DOWNLOAD
VIDEOS ()

Books ()

Text
Transcripts ()

Live sessions
- Solve
sample
problems
with us ()

Hint

No, the answer is incorrect.


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

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=81&assessment=190 3/4
8/9/22, 11:12 AM Problem Solving Through Programming In C - - Unit 12 - Week 10

1 point

9)

Hint

No, the answer is incorrect.


Score: 0
Accepted Answers:
(Type: String) -12, -12

1 point

10)

Hint

No, the answer is incorrect.


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

1 point

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=81&assessment=190 4/4
8/9/22, 11:12 AM Problem Solving Through Programming In C - - Unit 13 - Week 11

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

[email protected]

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

(course)

Course
outline Week 11: Assignment 11
The due date for submitting this assignment has passed.
How does an Due on 2022-04-13, 23:59 IST.
NPTEL online As per our records you have not submitted this assignment.
course work?
() 1) Interpolation is a process for 1 point

a) extracting feasible data set from a given set of data


Week 0 : ()
b) finding a value between two points on a line or curve
Week 1 () c) removing unnecessary points from a curve
d) all of the mentioned
Week 2 ()
No, the answer is incorrect.
Score: 0
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 ()

Week 9 ()

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=88&assessment=195 1/4
8/9/22, 11:12 AM Problem Solving Through Programming In C - - Unit 13 - Week 11

Week 10 ()

Week 11 () No, the answer is incorrect.


Score: 0
Lecture 51 : Accepted Answers:
Interpolation
(unit?
unit=88&lesson=89)
3) To solve a differential equation using Runge-Kutta method, necessary inputs from user 1 point
Lecture 52 :
Trapezoidal
to the algorithm is/are
Rule and
a) the differential equation dy/dx in the form x and y
Runge-Kutta
Method (unit? b) the step size based on which the iterations are executed.
unit=88&lesson=90) c) the initial value of y.
Lecture 53 : d) all the above
Recursion
No, the answer is incorrect.
(unit?
Score: 0
unit=88&lesson=91)
Accepted Answers:
Lecture 54 : d) all the above
Recursion(Contd.)
4) 1 point
(unit?
unit=88&lesson=92)

Lecture 55 :
Structure (unit?
unit=88&lesson=93)

Quiz: Week 11:


Assignment 11
(assessment? a) 0.64
name=195) b) 3.33

Week-11 c) 2.67
Program-01 d) 0.56
(/noc22_cs45/progassignment?
name=197)
No, the answer is incorrect.
Score: 0
Week-11 Accepted Answers:
Program-02 a) 0.64
(/noc22_cs45/progassignment?
name=198)
5) 1 point

Week-11
Program-03
a) 172.7
(/noc22_cs45/progassignment?
name=199) b) 125.6

Week-11
c) 136.2
Program-04 d) 142.8
(/noc22_cs45/progassignment?
No, the answer is incorrect.
name=200)
Score: 0
Accepted Answers:

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=88&assessment=195 2/4
8/9/22, 11:12 AM Problem Solving Through Programming In C - - Unit 13 - Week 11

Feedback For b) 125.6


Week 11 (unit?
6) 1 point
unit=88&lesson=94)

Assignment 11
Solution (unit?
unit=88&lesson=214)

Week 12 ()

Programming
a) 2.86
Exam 2022
(First b) 2.93
Session) c) 3.13
(10am - 11am) d) 3.08
()
No, the answer is incorrect.
Score: 0
Programming Accepted Answers:
Exam 2022 b) 2.93
(Second
Session) 7) 1 point
(8pm - 9pm) ()

DOWNLOAD
a) -2.506
VIDEOS ()
b) -2.706
Books () c) -2.406
d) None of the above
Text
No, the answer is incorrect.
Transcripts () Score: 0
Accepted Answers:
Live sessions b) -2.706
- Solve
sample 8) 1 point
problems
with us ()

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

No, the answer is incorrect.


Score: 0
Accepted Answers:

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=88&assessment=195 3/4
8/9/22, 11:12 AM Problem Solving Through Programming In C - - Unit 13 - Week 11

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

9) 1 point

a) 1.45 to 1.47
b) 1.74 to 1.76
c) 1.54 to 1.56
d) 1.63 to 1.65

No, the answer is incorrect.


Score: 0
Accepted Answers:
b) 1.74 to 1.76

10) 1 point

a) 9
b) 8
c) 5
d) 2

No, the answer is incorrect.


Score: 0
Accepted Answers:
d) 2

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=88&assessment=195 4/4
8/9/22, 11:12 AM Problem Solving Through Programming In C - - Unit 14 - Week 12

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

[email protected]

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 2022-04-20, 23:59 IST.
NPTEL online As per our records you have not submitted this assignment.
course work?
() 1) Which of the following are themselves a collection of different data types? 1 point

a) String
Week 0 : ()
b) Array
Week 1 () c) Character
d) Structure
Week 2 ()
No, the answer is incorrect.
Score: 0
Week 3 () Accepted Answers:
d) Structure
Week 4 ()
2) Which of the following comments about the usage structures is true? 1 point

Week 5 ()
a) Storage class can be assigned to individual member
b) Individual members can be initialized within a structure type declaration
Week 6 ()
c) The scope of the member name is confined to the particular structure, within which it is
Week 7 () defined
d) None
Week 8 ()
No, the answer is incorrect.
Score: 0
Week 9 () Accepted Answers:
c) The scope of the member name is confined to the particular structure, within which it is defined

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=95&assessment=203 1/5
8/9/22, 11:12 AM Problem Solving Through Programming In C - - Unit 14 - Week 12

3) Can we declare function inside structure of C Programming? 1 point


Week 10 ()
a) Yes
Week 11 ()
b) No
c) Compiler dependant
Week 12 ()
d) Its possible, but causes runtime errors.
Lecture 56 :
No, the answer is incorrect.
Structure Score: 0
(Contd.) (unit?
Accepted Answers:
unit=95&lesson=96)
b) No
Lecture 57 :
4) 1 point
Structure with
typedef (unit?
unit=95&lesson=97)

Lecture 58 :
Pointer (unit?
unit=95&lesson=98)

Lecture 59 :
Pointer (Contd.)
(unit?
unit=95&lesson=99)

Lecture 60 :
Pointer in
Structures
(unit?
unit=95&lesson=100)

Lecture 61 :
Dynamic
a) IIT
Allocation and
File (unit? b) 2
unit=95&lesson=101) c) IIT 2
Quiz: d) Compilation error
Assignment
No, the answer is incorrect.
12 Score: 0
(assessment?
Accepted Answers:
name=203)
d) Compilation error
Week-12:
5) What is the difference between structure and union? 1 point
Program 01
(/noc22_cs45/progassignment?
a) They are the same
name=208)
b) Union takes less memory
Week-12:
c) Structure is faster
Program 02
(/noc22_cs45/progassignment? d) Union is faster
name=209)
No, the answer is incorrect.
Score: 0
Week-12:
Program 03
Accepted Answers:

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=95&assessment=203 2/5
8/9/22, 11:12 AM Problem Solving Through Programming In C - - Unit 14 - Week 12

(/noc22_cs45/progassignment?
b) Union takes less memory
name=210)
6) 1 point
Week-12
Problem 04
(/noc22_cs45/progassignment?
name=211)

Feedback For
Week 12 (unit?
unit=95&lesson=102)

Assignment 12
Solution (unit?
unit=95&lesson=215)

Programming
a) 10
Exam 2022
(First b) a
Session) c) address of a
(10am - 11am) d) compilation error
()
No, the answer is incorrect.
Score: 0
Programming Accepted Answers:
Exam 2022 d) compilation error
(Second
Session) 7) 1 point
(8pm - 9pm) ()

DOWNLOAD
VIDEOS ()

Books ()

Text
Transcripts ()

Live sessions
- Solve
sample
problems
with us ()

a) Stu garbage
b) Stu Stu
c) Garbage Garbage
d) Compilation Error

N h i i

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=95&assessment=203 3/5
8/9/22, 11:12 AM Problem Solving Through Programming In C - - Unit 14 - Week 12

No, the answer is incorrect.


Score: 0
Accepted Answers:
b) Stu Stu

8) 1 point

a) 5 10 10
b) 10 5 15
c) 10 5 10
d) 10 15 5

No, the answer is incorrect.


Score: 0
Accepted Answers:
c) 10 5 10

9) 1 point

a) 2036 2036 2036


b) 2012 4 2204
c) 2036 10 10

https://onlinecourses.nptel.ac.in/noc22_cs45/unit?unit=95&assessment=203 4/5
8/9/22, 11:12 AM Problem Solving Through Programming In C - - Unit 14 - Week 12

d) 2012 4 6

No, the answer is incorrect.


Score: 0
Accepted Answers:
a) 2036 2036 2036

10) 0 points

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/noc22_cs45/unit?unit=95&assessment=203 5/5

You might also like