100% found this document useful (1 vote)
175 views

Problem Solving in C January To September 2019

[DOCUMENT]: The following document outlines a 10-week online course on problem solving through programming in
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
175 views

Problem Solving in C January To September 2019

[DOCUMENT]: The following document outlines a 10-week online course on problem solving through programming in
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 73

3/28/2021 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
Assignment 1
How does an NPTEL online The due date for submitting this assignment has passed.
course work? Due on 2020-02-12, 23:59 IST.
As per our records you have not submitted this assignment.
Week 0
1) C language was developed by 1 point
Week 1
a) Dennis Ritchie (https://www.google.com/search?client=firefox-b-
Lecture 1 : Introduction
(unit?unit=2&lesson=15)
d&q=Dennis+Ritchie&stick=H4sIAAAAAAAAAONgVuLQz9U3MLI0Nn7E6Mgt8PLHPWEpi0lrTl5jNOLiCs
b) Bjarne Stroustrup
Lecture 2: Idea of
Algorithms (unit? c) James Gosling (https://www.google.com/search?client=firefox-b-
unit=2&lesson=16) d&q=James+Gosling&stick=H4sIAAAAAAAAAONgVuLQz9U3SMkzjH_E6Mgt8PLHPWEpi0lrTl5jNOLiCs
Lecture 3: Flow Chart and
d) Guido van Rossum
Pseudocode (unit? No, the answer is incorrect.
unit=2&lesson=17) Score: 0
Accepted Answers:
Lecture 4 : Introduction to
Programming Language a) Dennis Ritchie (https://www.google.com/search?client=firefox-b-
Concepts (unit? d&q=Dennis+Ritchie&stick=H4sIAAAAAAAAAONgVuLQz9U3MLI0Nn7E6Mgt8PLHPWEpi0lrTl5jNOLiCs7IL3
unit=2&lesson=18)
2) A 2D diagram to represent the steps to be followed to solve a problem is known as 1 point
Lecture 5 : Variables and
Memory (unit? a) Flow-chart
unit=2&lesson=19)
b) Pseudo-code
Quiz : Assignment 1 Both (a) and (b)
(assessment?name=93)
d) None of these
Feedback For Week 1
(unit?unit=2&lesson=96)
No, the answer is incorrect.
Score: 0
Accepted Answers:
Week 2
a) Flow-chart
Week 3 3) Which one of the following statement is the most appropriate? 1 point

Week 4 a) Flowchart is diagrammatic representation of the algorithm. Pseudo code is just another name of
algorithm.
Week 5
b) Flowchart is basically a diagrammatic representation of the algorithm. Whereas in pseudo code normal

Week 6
English language is translated into the programming languages to be worked on.
c)  Pseudo code is basically a diagrammatic representation of the algorithm. Whereas in flowchart normal
Week 7 English language is translated into the programming languages to be worked on.
d)  Pseudo code is another name of programming. Whereas in flowchart is diagrammatic representation of
Week 8 algorithm.
Week 9 No, the answer is incorrect.
Score: 0
Accepted Answers:
Week 10
b) Flowchart is basically a diagrammatic representation of the algorithm. Whereas in pseudo code normal

Week 11
English language is translated into the programming languages to be worked on.
4) The ALU of a computer 1 point
Week 12
a) Can perform logical operation only
DOWNLOAD VIDEOS b) Can perform arithmetic operation only
c) Can perform both arithmetic and logical operations
Assignment Solution
d) None of the above.
December 4 Programming No, the answer is incorrect.
Test Score: 0
Accepted Answers:
c) Can perform both arithmetic and logical operations

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=2&assessment=93 1/3
3/28/2021 Problem solving through Programming In C - - Unit 3 - Week 1

December 4 programming
5) When we write X=10 and Y=X, which of the following memory assignment is correct 1 point

test session 2 a) X and Y will have same location and 10 will be stored.
  b) X and Y will have two distinct locations and 10 will be stored in both.
c) X and Y will have same location and only X will contain value 10
d) X and Y will have two distinct locations and only X will contain value 10
No, the answer is incorrect.
Score: 0
Accepted Answers:
b) X and Y will have two distinct locations and 10 will be stored in both.
6) 1 point

a) 120
b) 720
c) 5040
d) 1
No, the answer is incorrect.
Score: 0
Accepted Answers:
b) 720
7) 1 point

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=2&assessment=93 2/3
3/28/2021 Problem solving through Programming In C - - Unit 3 - Week 1

a) 4321
b) 10
c) 4
d) 9
No, the answer is incorrect.
Score: 0
Accepted Answers:
b) 10
8) 1 point

a) 1. r!=0 2. a=r and b=q


b) 1. q=0 2. a=b and b=r
c) 1. r=0 2. a=q and b=r
d) 1. r=0 2. a=b and b=r
No, the answer is incorrect.
Score: 0
Accepted Answers:
d) 1. r=0 2. a=b and b=r
9) Compiler helps in the translation from 1 point

a) Integer to binary
b) High-level program to binary digits
c) High-level language to machine level language
d) Pseudo code to computer program
No, the answer is incorrect.
Score: 0
Accepted Answers:
c) High-level language to machine level language
10) Computer memory which is used to store programs and data currently being processed by CPU is 1 point

a) ROM
b) RAM
c) Cache memory
d) PROM
No, the answer is incorrect.
Score: 0
Accepted Answers:
b) RAM

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=2&assessment=93 3/3
3/28/2021 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 Assignment 2
The due date for submitting this assignment has passed.
How does an Due on 2020-02-12, 23:59 IST.
NPTEL online As per our records you have not submitted this assignment.
course work?
1) Which of the following is not a C variable? 1 point
Week 0
a) Count123
Week 1 b) Count_123
c) Count@123
Week 2
d) X_123_Count
Lecture 6 :
No, the answer is incorrect.
Types of Score: 0
Software and Accepted Answers:
Compilers
c) Count@123
(unit?
unit=3&lesson=20) 2) A function 1 point
Lecture 7:
Introduction a)  is a block of statements to perform some specific task
to C b)  is a fundamental modular unit to perform some task
Programming
Language
c)  has a name and can be used multiple times
(unit? d)  All the above options are true
unit=3&lesson=21)
No, the answer is incorrect.
Score: 0
Lecture 8 :
Variables and Accepted Answers:
Variable d)  All the above options are true
Types in C
(unit?
3) Which of the following statement is correct? 1 point
unit=3&lesson=22)
a) System software is dependent on application software.

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=3&assessment=94 1/5
3/28/2021 Problem solving through Programming In C - - Unit 4 - Week 2

Lecture 9 : b) Application software is dependent on system software.


Introducing c) Both are independent of each other.
Functions
(unit? d) None of the above.
unit=3&lesson=23) No, the answer is incorrect.
Score: 0
Lecture 10 :
Accepted Answers:
Address and
Content of
b) Application software is dependent on system software.
Variables and
Types (unit?
4) Syntax error occurs when 1 point

unit=3&lesson=24)
a) The rules of grammar of the programming language is violated
Quiz : b) The statements in the program have no meaning
Assignment 2
(assessment? c) The program gives wrong or undesired output
name=94) d) Some illegal operation(e.g. divide by zero) is done
Feedback For No, the answer is incorrect.
Week 2 (unit? Score: 0
unit=3&lesson=97) Accepted Answers:
a) The rules of grammar of the programming language is violated
Week 3
5)If integer needs two bytes of storage, then the minimum value 1 point
Week 4 of a signed integer in C would be

Week 5

Week 6

Week 7

Week 8 No, the answer is incorrect.


Score: 0
Accepted Answers:
Week 9

Week 10 6) Which of the following statement is correct? 1 point

Week 11
I. Keywords are those words whose meaning is already defined by
Compiler.
Week 12 II. Keywords cannot be used as variable name.
III. There are 32 keywords in C.
DOWNLOAD IV. C keywords are also called as reserved words.
VIDEOS
a) I and II
Assignment b) II and III
Solution
c) I, II and IV
December 4 d) All of the above
Programming No, the answer is incorrect.
Test Score: 0
Accepted Answers:
December 4 d) All of the above
programming
test session 2

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=3&assessment=94 2/5
3/28/2021 Problem solving through Programming In C - - Unit 4 - Week 2

  7) 1 point

a) 8.00
b)  4.00
c)  0.00
d)  16.00
No, the answer is incorrect.
Score: 0
Accepted Answers:
d)  16.00
8) 1 point

a) 21.00
b) 19.00
c) 0.00
d) 17.00
No, the answer is incorrect.
Score: 0
Accepted Answers:
d) 17.00
9) 1 point

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=3&assessment=94 3/5
3/28/2021 Problem solving through Programming In C - - Unit 4 - Week 2

a) 1.8*C +32
b) 1.8*(C + 32)
c) 1.8*C - 32
d) C/1.8 + 32
No, the answer is incorrect.
Score: 0
Accepted Answers:
a) 1.8*C +32
10) 1 point

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


b) a=a%b; b=a+b;  a=a/b;
c) a=a+b; b=a-b; a=a-b;
d) None of the above
No, the answer is incorrect.
Score: 0
Accepted Answers:
c) a=a+b; b=a-b; a=a-b;

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=3&assessment=94 4/5
3/28/2021 Problem solving through Programming In C - - Unit 4 - Week 2

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=3&assessment=94 5/5
3/28/2021 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 Assignment 3
The due date for submitting this assignment has passed.
How does an Due on 2020-02-19, 23:59 IST.
NPTEL online As per our records you have not submitted this assignment.
course work?
1)The precedence order (from highest to lowest) of arithmetic 1 point
Week 0
operators is
Week 1
a) %, *, /, +, –
Week 2
b) %, +, /, *, –
c) +, -, %, *, /
Week 3 d) %, +, -, *, /
No, the answer is incorrect.
Lecture 11 :
Score: 0
Assignment
Accepted Answers:
Statement
and a) %, *, /, +, –
Operators in
C (unit?
2) Which of the following are incorrect statements? 1 point
unit=4&lesson=25) 1) if(a==7) printf("IncludeHelp");
Lecture 12 : 2) if(7==a) printf("IncludeHelp");
Arithmetic 3) if(a=7) printf("IncludeHelp");
Expressions
and Relational
4) if(7=a) printf("IncludeHelp");
Expressions
a)  1 and 2.
(unit?
unit=4&lesson=26) b)  3 only.
c)  4 only.
Lecture 13 :
Logical d)  2,3 and 4.
Operators
No, the answer is incorrect.
and Change in
Score: 0

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=4&assessment=102 1/6
3/28/2021 Problem solving through Programming In C - - Unit 5 - Week 3

Control Flow Accepted Answers:


(unit? c)  4 only.
unit=4&lesson=27)
3) 1 point
Lecture 14 :
Use of Logical
Operators in
Branching
(unit?
unit=4&lesson=28)

Lecture 15 :
Branching : IF
- ELSE
Statement
(unit?
unit=4&lesson=29)

Quiz :
Assignment 3
(assessment? a) Programming on C 0
name=102)
b) NPTEL 0
Week-03 c) NPTEL 3
Program-01
(/noc20_cs06/progassignment? d) Compilation error
name=105) No, the answer is incorrect.
Score: 0
Week-03
Accepted Answers:
Program-02
b) NPTEL 0
(/noc20_cs06/progassignment?
name=106)
4) 1 point
Week-03
Program-03
(/noc20_cs06/progassignment?
name=107)

Week-03
Program-04
(/noc20_cs06/progassignment?
name=108)

Feedback For
Week 3 (unit?
unit=4&lesson=114)
a) -18
Week 4 b) 38
Week 5
c) 24
d) -32
Week 6 No, the answer is incorrect.
Score: 0
Week 7 Accepted Answers:
b) 38
Week 8

Week 9

Week 10

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=4&assessment=102 2/6
3/28/2021 Problem solving through Programming In C - - Unit 5 - Week 3

5) 1 point
Week 11

Week 12

DOWNLOAD
VIDEOS

Assignment
Solution

December 4
Programming
Test
a) 10
December 4 b) 11
programming c) 20
test session 2 d) Compiler error
  No, the answer is incorrect.
Score: 0
Accepted Answers:
b) 11
6)

Hint

No, the answer is incorrect.


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

1 point

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=4&assessment=102 3/6
3/28/2021 Problem solving through Programming In C - - Unit 5 - Week 3

7) 1 point

a) true
b) false
c) Compiler dependent
d) Compiler error
No, the answer is incorrect.
Score: 0
Accepted Answers:
b) false
8) 1 point

a) true
b) false
c) Syntax Error
d) Compilation Error
No, the answer is incorrect.
Score: 0
Accepted Answers:
b) false
9) Which of the following statement is correct? 1 point

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=4&assessment=102 4/6
3/28/2021 Problem solving through Programming In C - - Unit 5 - Week 3

a) Operator precedence determines which operator is performed


first in an expression with more than one operator with different
precedence. Associativity is used when two operators of same
precedence appear in an expression
b) Operator associativity determines which operator is performed
first in an expression with more than one operator with different
associativity. Precedence is used when two operators of same
precedence appear in an expression
c) Operator precedence and associativity are same.
d) None of the above
No, the answer is incorrect.
Score: 0
Accepted Answers:
a) Operator precedence determines which operator is performed first
in an expression with more than one operator with different
precedence. Associativity is used when two operators of same
precedence appear in an expression
10) 1 point

a) Kolkata
b) Delhi
c) Bangalore
d) Compiler error
No, the answer is incorrect.
Score: 0
Accepted Answers:
b) Delhi

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=4&assessment=102 5/6
3/28/2021 Problem solving through Programming In C - - Unit 5 - Week 3

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=4&assessment=102 6/6
3/28/2021 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 Assignment 4
The due date for submitting this assignment has passed.
How does an Due on 2020-02-26, 23:59 IST.
NPTEL online As per our records you have not submitted this assignment.
course work?
1) The loop which is executed at least once is 1 point
Week 0
a) while
Week 1 b) do-while
Week 2
c) for
d) none of the above
Week 3 No, the answer is incorrect.
Score: 0
Week 4 Accepted Answers:
b) do-while
Lecture 16: IF-
ELSE
2) 1 point
Statement
(Contd.) (unit?
unit=5&lesson=30)

Lecture 17:
Switch
statement
(unit?
unit=5&lesson=31)

Lecture 18:
Switch
Statement
(Contd.) and
Introduction
to Loops

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=5&assessment=103 1/6
3/28/2021 Problem solving through Programming In C - - Unit 6 - Week 4

(unit?
unit=5&lesson=32)

Lecture 19:
Implementing
Repetitions
(Loops) (unit?
unit=5&lesson=33)

Lecture 20:
Implementation
of Loops with
for Statement
(Contd.) (unit?
unit=5&lesson=34)

Quiz :
Assignment 4
(assessment?
name=103)

Week-04
Program-01 a) Sum of the digits of a number
(/noc20_cs06/progassignment?
name=109)
b) Sum of the factorial of individual digits in a number
c) Reverse of a number
Week-04
Program-02
d) The same number is printed
(/noc20_cs06/progassignment?
No, the answer is incorrect.
name=110) Score: 0
Accepted Answers:
Week-04
Program-03
c) Reverse of a number
(/noc20_cs06/progassignment?
3) 1 point
name=111)

Week-04
Program-04
(/noc20_cs06/progassignment?
name=112)

Week-04
Program-05
(/noc20_cs06/progassignment?
name=113)

Feedback For
Week 4 (unit?
unit=5&lesson=115)

Week 5
a) True
Week 6 b) False
Week 7
c) Both ‘True’ and ‘False’ will be printed
d) Compilation error
Week 8 No, the answer is incorrect.
Score: 0
Week 9 Accepted Answers:
c) Both ‘True’ and ‘False’ will be printed
Week 10 4) 1 point

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=5&assessment=103 2/6
3/28/2021 Problem solving through Programming In C - - Unit 6 - Week 4

Week 11

Week 12

DOWNLOAD
VIDEOS

Assignment
Solution

December 4
Programming
Test

December 4 a) NPTEL
programming
test session 2
b) PROGRAMMING
c) No output
  d) Compilation error as A and a are not declared as character
variable
No, the answer is incorrect.
Score: 0
Accepted Answers:
a) NPTEL
5) 1 point

a) 1500.000000
b) 0.000000
c) 1400.000000
d) Compilation error
No, the answer is incorrect.
Score: 0
Accepted Answers:
b) 0.000000
6) 1 point

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=5&assessment=103 3/6
3/28/2021 Problem solving through Programming In C - - Unit 6 - Week 4

a) condition1 will be evaluated first, condition2 will be evaluated


second
b) condition2 will be evaluated first, condition1 will be evaluated
second
c) condition1 will be evaluated first, condition2 will be evaluated
only if condition1 is TRUE
d) condition2 will be evaluated first, condition1 will be evaluated
only if condition2 is TRUE
No, the answer is incorrect.
Score: 0
Accepted Answers:
c) condition1 will be evaluated first, condition2 will be evaluated
only if condition1 is TRUE
7) 1 point

a) a=101
b) a=5
c) a=65
d) Compilation error: Not a valid number
No, the answer is incorrect.
Score: 0
Accepted Answers:
c) a=65
8) 1 point

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=5&assessment=103 4/6
3/28/2021 Problem solving through Programming In C - - Unit 6 - Week 4

a) 10 6
b) 10 8
c) 57
d) 58
No, the answer is incorrect.
Score: 0
Accepted Answers:
c) 5 7
9)     while(1) is used in a program to create 1 point

a) False statement
b) Infinite loop
c) Terminating the loop
d) Never executed loop
No, the answer is incorrect.
Score: 0
Accepted Answers:
b) Infinite loop
10) 1 point

a) 0
12

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=5&assessment=103 5/6
3/28/2021 Problem solving through Programming In C - - Unit 6 - Week 4

b) 1
11
c) 0
00
d) 0
11
No, the answer is incorrect.
Score: 0
Accepted Answers:
d) 0
11

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=5&assessment=103 6/6
3/28/2021 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 Assignment 5
The due date for submitting this assignment has passed.
How does an Due on 2020-03-04, 23:59 IST.
NPTEL online As per our records you have not submitted this assignment.
course work?
1) 1 point
Week 0

Week 1

Week 2

Week 3

Week 4

Week 5

Lecture 21:
For Statement
(Contd.) (unit?
unit=6&lesson=35)

Lecture 22:
Example of If-
Else (unit?
unit=6&lesson=36) a) 012…9
Lecture 23 : b) 0 1 2 … 10
Example of c) 123…9
Loops (unit?
unit=6&lesson=37)
d) 1 2 3 … 10
No, the answer is incorrect.
Score: 0

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=6&assessment=104 1/7
3/28/2021 Problem solving through Programming In C - - Unit 7 - Week 5

Accepted Answers:
Lecture 24 :
Example of d) 1 2 3 … 10
Loops
(Contd.) (unit?
2) Continue statement used 1 point
unit=6&lesson=38)
a) to continue to the next line of code
Lecture 25 :
b) to debug
Example of
Loops c) to stop the current iteration and begin the next iteration from
(Contd.), Use the beginning
of FOR Loops
(unit?
d) None of the above
unit=6&lesson=39) No, the answer is incorrect.
Score: 0
Quiz :
Accepted Answers:
Assignment 5
(assessment?
c) to stop the current iteration and begin the next iteration from the
name=104) beginning
Week-05 3) 1 point
Problem-01
(/noc20_cs06/progassignment?
name=118)

Week-05
Problem-02
(/noc20_cs06/progassignment?
name=119)

Week-05
Problem-03
(/noc20_cs06/progassignment?
name=120)

Week-05
Program-04
(/noc20_cs06/progassignment?
name=121)

Week-05
Program-05
(/noc20_cs06/progassignment?
name=122) a) 4, 5
Feedback For b) 4, 4
Week 5 (unit? c) 5, 5
unit=6&lesson=130)
d) 0, 0
Week 6 No, the answer is incorrect.
Score: 0
Week 7 Accepted Answers:
c) 5, 5
Week 8 4) 1 point

Week 9

Week 10

Week 11

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=6&assessment=104 2/7
3/28/2021 Problem solving through Programming In C - - Unit 7 - Week 5

Week 12

DOWNLOAD
VIDEOS

Assignment
Solution

December 4
Programming
Test

December 4
programming
test session 2

a) n multiplied n times
b) factorial of n
c) display factors of n
d) display Fibonacci series upto n.
No, the answer is incorrect.
Score: 0
Accepted Answers:
b) factorial of n

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=6&assessment=104 3/7
3/28/2021 Problem solving through Programming In C - - Unit 7 - Week 5

5) 1 point

a) IIT Delhi
b) IIT Kharagpur
c) IIT Madras
d) IIT Guwahati
No, the answer is incorrect.
Score: 0
Accepted Answers:
c) IIT Madras

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=6&assessment=104 4/7
3/28/2021 Problem solving through Programming In C - - Unit 7 - Week 5

6) 1 point

a) Condition is true
b) Condition is false
c) Error
d) No output possible
No, the answer is incorrect.
Score: 0
Accepted Answers:
a) Condition is true
7) 1 point

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

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=6&assessment=104 5/7
3/28/2021 Problem solving through Programming In C - - Unit 7 - Week 5

d) 4 5
No, the answer is incorrect.
Score: 0
Accepted Answers:
c) 1 2
8) 1 point

a) Compilation error
b) 0, 1, 2 …….., 127
c) 0, 1, 2, …….., 127, -128, -127,……., -2, -1, 0, 1, ……. infinite
loop
d) 1, 2, 3…….,127
No, the answer is incorrect.
Score: 0
Accepted Answers:
c) 0, 1, 2, …….., 127, -128, -127,……., -2, -1, 0, 1, ……. infinite loop
9) 1 point

a) n==4
b) n%400 != 0
c) n>0

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=6&assessment=104 6/7
3/28/2021 Problem solving through Programming In C - - Unit 7 - Week 5

d) n%400 == 0
No, the answer is incorrect.
Score: 0
Accepted Answers:
d) n%400 == 0
10) 1 point

a) ‘while vs do-while’ once


b) ‘Out of loop’ infinite times
c) Both ‘while vs do-while’ and ‘Out of loop’ once
d) ‘while vs do-while’ infinite times
No, the answer is incorrect.
Score: 0
Accepted Answers:
d) ‘while vs do-while’ infinite times

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=6&assessment=104 7/7
3/28/2021 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 Assignment 6
The due date for submitting this assignment has passed.
How does an Due on 2020-03-11, 23:59 IST.
NPTEL online As per our records you have not submitted this assignment.
course work?
1) Which of the following statement(s) is/are correct ? 1 point
Week 0
int num[7];
          num[7]=8;
Week 1
a)      In the first statement 7 specifies a particular element, whereas in
Week 2 the second statement it specifies a type;
b)      In the first statement 7 specifies a particular element, whereas in
Week 3
the second statement it specifies the array size.
c)      In the first statement 7 specifies the array size, whereas in the
Week 4
second statement it specifies a particular element of array.
Week 5 d)      In both the statement 7 specifies array size.
No, the answer is incorrect.
Week 6 Score: 0
Accepted Answers:
Lecture 26: c)      In the first statement 7 specifies the array size, whereas in the second
Introduction statement it specifies a particular element of array.
to Arrays
(unit? 2) What is the right way to initialize array in C? 1 point
unit=7&lesson=40)
a)      int arr{}={1,2,5,6,9}
Lecture 27:
Arrays b)      int arr[5]={1,2,5,6,9}
(Contd.) (unit? c)      int arr{5}={1,2,5,6,9}
unit=7&lesson=41)
d)      int arr()={1,2,5,6,9}
Lecture 28:
No, the answer is incorrect.
Arrays Score: 0

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=7&assessment=124 1/6
3/28/2021 Problem solving through Programming In C - - Unit 8 - Week 6

(Contd.) (unit? Accepted Answers:


unit=7&lesson=42) b)      int arr[5]={1,2,5,6,9}
Lecture 29: 3) An integer array of size 10 is declared in a C program. The memory 1 point
Program location of the first byte of the array is 1000. What will be the location of the 7th
using Arrays
element of the array? (integer takes 2 bytes of memory)
(unit?
unit=7&lesson=43)
a)  1014 
Lecture 30: b)   1012
Array
c)   1010
Problem
(unit? d)   1016
unit=7&lesson=44)
No, the answer is incorrect.
Score: 0
Quiz :
Assignment 6 Accepted Answers:
(assessment? b)   1012
name=124)
4) Which of the statement is correct? 1 point
Week-06
Program-01 a)      An array may contain more than one element
(/noc20_cs06/progassignment? b)      All elements of array has to be of same data type
name=125)
c)      The size of array has to be declared upfront
Week-06 d)      All of the above
Program-02
No, the answer is incorrect.
(/noc20_cs06/progassignment?
name=126) Score: 0
Accepted Answers:
Week-06 d)      All of the above
Program-03
5)
(/noc20_cs06/progassignment?
name=127)

Week-06
Program-04
(/noc20_cs06/progassignment?
name=128)

Week-06
Program-05
(/noc20_cs06/progassignment?
name=129)

Feedback For
Week 6 (unit?
unit=7&lesson=139)

Week 7

Week 8

Week 9

Week 10

Week 11

Week 12

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=7&assessment=124 2/6
3/28/2021 Problem solving through Programming In C - - Unit 8 - Week 6

DOWNLOAD Hint
VIDEOS

No, the answer is incorrect.


Assignment Score: 0
Solution
Accepted Answers:
(Type: Numeric) 4
December 4
Programming 1 point
Test
6) Which assignment is not valid for integer arrays in C programming? (arr, 1 point
arr1 and arr2 are integer arrays)
December 4
programming a)   arr[4]={1,2.5,3,4};
test session 2
b)  arr[]={1,2,3,4}
  c)   arr1=arr2
d)   All are valid assignment
No, the answer is incorrect.
Score: 0
Accepted Answers:
c)   arr1=arr2
7) 1 point

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


b)      i=6, j=5, k=3
a)      i=6, j=4, k=2
d)      i=5, j=4, k=2
No, the answer is incorrect.
Score: 0
Accepted Answers:
a)      i=5, j=5, k=2
8)

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=7&assessment=124 3/6
3/28/2021 Problem solving through Programming In C - - Unit 8 - Week 6

Hint

No, the answer is incorrect.


Score: 0
Accepted Answers:
(Type: String) IIT MADRAS

1 point

9)

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=7&assessment=124 4/6
3/28/2021 Problem solving through Programming In C - - Unit 8 - Week 6

Hint

No, the answer is incorrect.


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

1 point

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=7&assessment=124 5/6
3/28/2021 Problem solving through Programming In C - - Unit 8 - Week 6

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/noc20_cs06/unit?unit=7&assessment=124 6/6
3/28/2021 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 Assignment 7
The due date for submitting this assignment has passed.
How does an Due on 2020-03-18, 23:59 IST.
NPTEL online As per our records you have not submitted this assignment.
course work?
1) In C language the last character of a string is 1 point
Week 0
a) \n
Week 1
b) \0
Week 2
c) \b
d) \t
Week 3 No, the answer is incorrect.
Score: 0
Week 4 Accepted Answers:
b) \0
Week 5
2)Consider the following declaration of a two-dimensional array 1 point
Week 6 in C:
char A[100][100];
Week 7 Assuming that the main memory is byte-addressable and that the
Lecture 31 :
array is stored starting from memory address 0, the address of A[40]
Linear Search [50] is
(unit?
unit=8&lesson=45) a) 4040
Lecture 32 :
b) 4050
Character c) 5040
Array and
d) 5050
Strings (unit?
unit=8&lesson=46) No, the answer is incorrect.
Score: 0

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=8&assessment=132 1/7
3/28/2021 Problem solving through Programming In C - - Unit 9 - Week 7

Accepted Answers:
Lecture 33 :
String b) 4050
Operations
3) 1 point
(unit?
unit=8&lesson=47)

Lecture 34 : 2-
D Array
Operation
(unit?
unit=8&lesson=48)

Lecture 35 :
Introducing
Functions
(unit?
unit=8&lesson=49)

Quiz :
Assignment 7
(assessment?
name=132)

Week-07
Program-01 a) n1=18, n2=17
(/noc20_cs06/progassignment? b) n1=18, n2=18
name=133)
c) n1=17, n1=17
Week-07
d) n1=17, n2=18
Program-02
No, the answer is incorrect.
(/noc20_cs06/progassignment?
name=134) Score: 0
Accepted Answers:
Week-07
Program-03
a) n1=18, n2=17
4) Which of the following
(/noc20_cs06/progassignment?
is a disadvantage of linear 1 point
name=135)
search?
Week-07
Program-04 a) Requires more space
(/noc20_cs06/progassignment?
name=136)
b) Greater time complexities compared to other searching
algorithms
Week-07
Program-05
c) Not easy to understand
(/noc20_cs06/progassignment? d) All of the mentioned
name=137)
No, the answer is incorrect.
Score: 0
Feedback For
Week 7 (unit? Accepted Answers:
unit=8&lesson=141) b) Greater time complexities compared to other searching algorithms
5) 1 point
Week 8

Week 9

Week 10

Week 11

Week 12

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=8&assessment=132 2/7
3/28/2021 Problem solving through Programming In C - - Unit 9 - Week 7

DOWNLOAD
VIDEOS

Assignment
Solution

December 4
Programming
Test

December 4
programming
test session 2

a) hello
b) world
c) world hello
d) hello world
No, the answer is incorrect.
Score: 0
Accepted Answers:
d) hello world
6) 1 point

a) (i%3) == 0
b) (i%2) == 0
c) (s[i]%3) == 0

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=8&assessment=132 3/7
3/28/2021 Problem solving through Programming In C - - Unit 9 - Week 7

d) (s[i]%2) == 0
No, the answer is incorrect.
Score: 0
Accepted Answers:
b) (i%2) == 0
7) 1 point

a) 0
b) 1
c) -1
d) None
No, the answer is incorrect.
Score: 0
Accepted Answers:
a) 0

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=8&assessment=132 4/7
3/28/2021 Problem solving through Programming In C - - Unit 9 - Week 7

8) 1 point

a) assignment
b) tnemngissa
c) nothing will be printed
d) tttttttttt
No, the answer is incorrect.
Score: 0
Accepted Answers:
c) nothing will be printed

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=8&assessment=132 5/7
3/28/2021 Problem solving through Programming In C - - Unit 9 - Week 7

9)

Hint

No, the answer is incorrect.


Score: 0
Accepted Answers:
(Type: String) 67,67

1 point

10)

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=8&assessment=132 6/7
3/28/2021 Problem solving through Programming In C - - Unit 9 - Week 7

Hint

No, the answer is incorrect.


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

1 point

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=8&assessment=132 7/7
3/28/2021 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 Assignment 8
The due date for submitting this assignment has passed.
How does an Due on 2020-03-25, 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
Week 0
a) Declaring the function logic
Week 1
b) Calling the function from the main body
Week 2
c) Telling the compiler, the kind of arguments used in the
function
Week 3 d) Telling the user for proper use of syntax while calling the
function
Week 4
No, the answer is incorrect.
Score: 0
Week 5 Accepted Answers:
c) Telling the compiler, the kind of arguments used in the
Week 6
function
Week 7 What is the default return type if it is not specified in
2) 1 point
function definition?
Week 8
a) void
Lecture 36:
More on
b) integer
Functions c) double
(unit? d) float
unit=9&lesson=50)
No, the answer is incorrect.
Lecture 37: Score: 0
Function Accepted Answers:

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=9&assessment=140 1/9
3/28/2021 Problem solving through Programming In C - - Unit 10 - Week 8

(Contd.) (unit? b) integer


unit=9&lesson=51)
3) 1 point
Lecture 38:
Scanf and
Printf
Functions;
Function
Prototype
(unit?
unit=9&lesson=52)

Lecture 39 :
Parameter
Passing in
Function
Revision (unit?
unit=9&lesson=53)

Lecture 40:
Parameter
Passing in
Function
Revision
(Contd.) (unit?
unit=9&lesson=54)

Quiz :
Assignment 8
(assessment?
name=140) a) Error: 'return' statement cannot be used with conditional
Week-08
operators
Program-01 b) Error: Prototype declaration
(/noc20_cs06/progassignment? c) Error: Two return statements cannot be used in any
name=142)
function
Week-08 d) No error
Program-02
No, the answer is incorrect.
(/noc20_cs06/progassignment?
name=144)
Score: 0
Accepted Answers:
Week-08 a) Error: 'return' statement cannot be used with conditional
Program-03
(/noc20_cs06/progassignment?
operators
name=145) 4) 1 point
Week-08
Program-04
(/noc20_cs06/progassignment?
name=146)

Week-08
Program-05
(/noc20_cs06/progassignment?
name=147)

Feedback For
Week 8 (unit?
unit=9&lesson=149)

Week 9

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=9&assessment=140 2/9
3/28/2021 Problem solving through Programming In C - - Unit 10 - Week 8

Week 10

Week 11

Week 12

DOWNLOAD
VIDEOS

Assignment
Solution

December 4
Programming
Test

December 4
programming
test session 2

a) Only once
b) Zero times
c) Infinite times
d) Compilation error
No, the answer is incorrect.
Score: 0
Accepted Answers:
b) Zero times
5) 1 point

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=9&assessment=140 3/9
3/28/2021 Problem solving through Programming In C - - Unit 10 - Week 8

a) 27.08
b) 27.083334
c) Compiler error as result is declared twice
d) Error: Invalid prototype declaration
No, the answer is incorrect.
Score: 0
Accepted Answers:
a) 27.08

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=9&assessment=140 4/9
3/28/2021 Problem solving through Programming In C - - Unit 10 - Week 8

6) 1 point

a) 10 11 12 13 14
b) 01234
c) 10 10 10 10 10
d) Compilation Error
No, the answer is incorrect.
Score: 0
Accepted Answers:
c) 10 10 10 10 10
7)

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=9&assessment=140 5/9
3/28/2021 Problem solving through Programming In C - - Unit 10 - Week 8

Hint

No, the answer is incorrect.


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

1 point

8) 1 point

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=9&assessment=140 6/9
3/28/2021 Problem solving through Programming In C - - Unit 10 - Week 8

a) Before swapping num1 = 10 num2 = 20


After swapping num1 = 10 num2 = 20
b) Before swapping num1 = 10 num2 = 20
After swapping num1 = 20 num2 = 10
c) Before swapping num1 = 10 num2 = 20
After swapping num1 = 20 num2 = 20
d) Before swapping num1 = 10 num2 = 20
After swapping num1 = 10 num2 = 10
No, the answer is incorrect.
Score: 0
Accepted Answers:
a) Before swapping num1 = 10 num2 = 20
After swapping num1 = 10 num2 = 20
9) 1 point

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=9&assessment=140 7/9
3/28/2021 Problem solving through Programming In C - - Unit 10 - Week 8

(a) Finds the maximum of a, b, and c


(b) Finds the minimum of a, b and c
(c) Finds the middle number of a, b, c
(d) None of the above
No, the answer is incorrect.
Score: 0
Accepted Answers:
(c) Finds the middle number of a, b, c
10) 1 point

(a) The function returns 0 for all values of j.


(b) The function prints the string something for all values of j.
(c) The function returns 0 when j = 50.
(d) The function will exhaust the runtime stack or run into an
infinite loop when j = 50

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=9&assessment=140 8/9
3/28/2021 Problem solving through Programming In C - - Unit 10 - Week 8

No, the answer is incorrect.


Score: 0
Accepted Answers:
(d) The function will exhaust the runtime stack or run into an
infinite loop when j = 50

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=9&assessment=140 9/9
3/28/2021 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 Assignment 9
The due date for submitting this assignment has passed.
How does an Due on 2020-04-01, 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
Week 0

Week 1

Week 2

Week 3

Week 4 No, the answer is incorrect.


Score: 0
Week 5 Accepted Answers:

Week 6
What is the best case and worst case complexity of
2) 1 point
Week 7 ordered linear search?
Week 8

Week 9

Lecture 41:
Substitution
of # include
and Macro
(unit? No, the answer is incorrect.
unit=10&lesson=55) Score: 0

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=10&assessment=150 1/6
3/28/2021 Problem solving through Programming In C - - Unit 11 - Week 9

Accepted Answers:
Lecture 42:
"search" as a
function (unit?
unit=10&lesson=56) Given an array arr = {12, 34, 47, 62, 85, 92, 95, 99,105}
3) 1 point

Lecture 43: and key = 34; what are the mid values (corresponding array
Binary Search elements) generated in the first and second iterations?
(unit?
unit=10&lesson=57) a) 85 and 12
Lecture 44: b) 85 and 34
Binary Search c) 62 and 34
(Contd.) (unit?
unit=10&lesson=58)
d) 62 and 47
No, the answer is incorrect.
Lecture 45: Score: 0
Sorting
Accepted Answers:
Methods
(unit?
b) 85 and 34
unit=10&lesson=59) 4) When the Binary search is best applied to an array? 1 point
Quiz :
Assignment 9 a) For very large size array
(assessment? b) When the array is sorted
name=150)
c) When the array elements are mixed data type
Week-09 d) When the array is unsorted
Program-01
No, the answer is incorrect.
(/noc20_cs06/progassignment?
name=151)
Score: 0
Accepted Answers:
Week-09 b) When the array is sorted
Program-02
5) Consider the array A[]= {5,4,9,1,3} apply the insertion
(/noc20_cs06/progassignment? 1 point
name=152)
sort to sort the array . Consider the cost associated with each sort is
Week-09 25 rupees, what is the total cost of the insertion sort for sorting the
Program-03
entire array?
(/noc20_cs06/progassignment?
name=153)
a) 25
Week-09 b) 50
Program-04
(/noc20_cs06/progassignment?
c) 75
name=154) d) 100
Week-09 No, the answer is incorrect.
Score: 0
Program-05
Accepted Answers:
(/noc20_cs06/progassignment?
name=155) c) 75
Feedback For 6)Select the code snippet which performs unordered linear 1 point
Week 9 (unit?
unit=10&lesson=168)
search iteratively?
Week 10

Week 11

Week 12

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=10&assessment=150 2/6
3/28/2021 Problem solving through Programming In C - - Unit 11 - Week 9

DOWNLOAD
VIDEOS

Assignment
Solution

December 4
Programming
Test

December 4
programming
test session 2

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=10&assessment=150 3/6
3/28/2021 Problem solving through Programming In C - - Unit 11 - Week 9

No, the answer is incorrect.


Score: 0
Accepted Answers:

7) 1 point

a) 35
b) 30
c) 50
d) 53
No, the answer is incorrect.
Score: 0
Accepted Answers:
d) 5 3
8)Consider an array of elements arr[5]= {5,4,3,2,1} , what 1 point
are the steps of insertions done while doing insertion sort in the
array.

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=10&assessment=150 4/6
3/28/2021 Problem solving through Programming In C - - Unit 11 - Week 9

No, the answer is incorrect.


Score: 0
Accepted Answers:

9) 1 point

a) 0
b) 1

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=10&assessment=150 5/6
3/28/2021 Problem solving through Programming In C - - Unit 11 - Week 9

c) 01
d) None of the above
No, the answer is incorrect.
Score: 0
Accepted Answers:
b) 1
10) 1 point

a) 10 10
b) 10 50
c) 50 50
d) Compilation error
No, the answer is incorrect.
Score: 0
Accepted Answers:
d) Compilation error

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=10&assessment=150 6/6
3/28/2021 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 Assignment 10
The due date for submitting this assignment has passed.
How does an Due on 2020-04-08, 23:59 IST.
NPTEL online As per our records you have not submitted this assignment.
course work?

In ……………, search start at the beginning of the list and 1 point


1)
Week 0
check every element in the list.
Week 1 a) Linear search
Week 2
b) Binary search
c) Hash search
Week 3 d) Binary tree search
No, the answer is incorrect.
Week 4 Score: 0
Accepted Answers:
Week 5 a) Linear search
Week 6
2) Bisection method is used to find 1 point

a) Derivative of a function at a given point


Week 7
b) Numerical integration of a function within a range
Week 8 c) Root of a function
d) None of the above
Week 9 No, the answer is incorrect.
Score: 0
Week 10 Accepted Answers:
c) Root of a function
Lecture 46:
Bubble Sort 3)How can you improve the best-case efficiency in bubble 1 point
sort? (The input is already sorted)

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=11&assessment=157 1/7
3/28/2021 Problem solving through Programming In C - - Unit 12 - Week 10

(Contd.) (unit?
unit=11&lesson=60)

Lecture 47:
Use of Pointer
in Function :
Context
Bubble Sort
(unit?
unit=11&lesson=61)

Lecture 48:
Arrays at
Strings (unit?
unit=11&lesson=62)

Lecture 49:
Data
Representation
(unit?
unit=11&lesson=63)

Lecture 50:
Bisection
Method (unit?
unit=11&lesson=64)

Quiz :
Assignment
10
(assessment?
name=157)

Week-10
Program-01
(/noc20_cs06/progassignment?
name=162)

Week-10
Program-02
(/noc20_cs06/progassignment?
name=163)

Week-10
Problem-03
(/noc20_cs06/progassignment?
name=164)

Week-10
Problem-04
(/noc20_cs06/progassignment?
name=165)

Week-10
Program-05
(/noc20_cs06/progassignment?
name=166)

Feedback For
Week 10
(unit?
unit=11&lesson=176)

Week 11

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=11&assessment=157 2/7
3/28/2021 Problem solving through Programming In C - - Unit 12 - Week 10

Week 12

DOWNLOAD
VIDEOS

Assignment
Solution

December 4
Programming
Test

December 4
programming
test session 2

No, the answer is incorrect.


Score: 0
Accepted Answers:

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=11&assessment=157 3/7
3/28/2021 Problem solving through Programming In C - - Unit 12 - Week 10

4) 0 points

a) Exactly one root


b) no root exists
c) at least one root
d) roots are undermined
No, the answer is incorrect.
Score: 0
Accepted Answers:
b) no root exists
5)

Hint

No, the answer is incorrect.


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

1 point

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=11&assessment=157 4/7
3/28/2021 Problem solving through Programming In C - - Unit 12 - Week 10

6) 1 point

a) o,o
b) p,g
c) g,g
d) g,r
No, the answer is incorrect.
Score: 0
Accepted Answers:
c) g,g
7) 1 point

a) 23,11
b) 23,23
c) 11,17
d) 17,17
No, the answer is incorrect.
Score: 0
Accepted Answers:
a) 23,11

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=11&assessment=157 5/7
3/28/2021 Problem solving through Programming In C - - Unit 12 - Week 10

8) 1 point

a) 2
b) 4
c) 7
d) 5
No, the answer is incorrect.
Score: 0
Accepted Answers:
d) 5
9)

Hint

No, the answer is incorrect.


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

1 point

10)

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=11&assessment=157 6/7
3/28/2021 Problem solving through Programming In C - - Unit 12 - Week 10

Hint

No, the answer is incorrect.


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

1 point

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=11&assessment=157 7/7
3/28/2021 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 Assignment 11
The due date for submitting this assignment has passed.
How does an Due on 2020-04-15, 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
Week 0
a) extracting feasible data set from a given set of data
Week 1
b) finding a value between two points on a line or curve.
Week 2
c) removing unnecessary points from a curve
d) all of the mentioned
Week 3 No, the answer is incorrect.
Score: 0
Week 4 Accepted Answers:
b) finding a value between two points on a line or curve.
Week 5
2) 1 point

Week 6

Week 7

Week 8

Week 9

Week 10

Week 11

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=12&assessment=158 1/4
3/28/2021 Problem solving through Programming In C - - Unit 13 - Week 11

Lecture 51 :
Interpolation
(unit?
unit=12&lesson=65)
No, the answer is incorrect.
Lecture 52 : Score: 0
Trapezoidal Accepted Answers:
Rule and
Runge-Kutta
Method (unit?
unit=12&lesson=66)

Lecture 53 : 3) 1 point
Recursion
(unit?
unit=12&lesson=67)

Lecture 54 :
Recursion(Contd.)
(unit?
unit=12&lesson=68)

Lecture 55 :
Structure a) 12.78
(unit? b) 13.08
unit=12&lesson=69)
c) 14.12
Quiz : d) 11.36
Assignment
11 No, the answer is incorrect.
(assessment?
Score: 0
name=158) Accepted Answers:
b) 13.08
Week-11
Program-01 4)
(/noc20_cs06/progassignment?
name=169)

Week-11
Program-02
(/noc20_cs06/progassignment?
name=170)

Week-11 Hint
Program-03
(/noc20_cs06/progassignment?
No, the answer is incorrect.
name=171) Score: 0
Week-11 Accepted Answers:
Program-04 (Type: Numeric) 22.5962
(/noc20_cs06/progassignment?
1 point
name=172)

Week-11
5) Accuracy of the trapezoidal rule increases when 1 point
Program-05
(/noc20_cs06/progassignment? a) integration is carried out for sufficiently large range
name=173) b) instead of trapezoid, we take rectangular approximation
Feedback For function
Week 11 c) number of segments are increased
(unit?
unit=12&lesson=183)
d) integration is performed for only integer range

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=12&assessment=158 2/4
3/28/2021 Problem solving through Programming In C - - Unit 13 - Week 11

No, the answer is incorrect.


Week 12 Score: 0
Accepted Answers:
DOWNLOAD c) number of segments are increased
VIDEOS
6) 1 point

Assignment
Solution

December 4
Programming
Test

December 4
programming a) 2.86
test session 2 b) 2.93
  c) 3.13
d) 3.08
No, the answer is incorrect.
Score: 0
Accepted Answers:
b) 2.93
7) Which of the following cannot be a structure member? 1 point

a) another structure
b) function
c) array
d) none of the above
No, the answer is incorrect.
Score: 0
Accepted Answers:
b) function
8) 1 point

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:
a) A-2, B-4, C-1, D-3

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=12&assessment=158 3/4
3/28/2021 Problem solving through Programming In C - - Unit 13 - Week 11

9) 1 point

a) 12.56 to 12.92
b) 13.12 to 13.66
c) 14.24 to 14.58
d) 15.13 to 15.45
No, the answer is incorrect.
Score: 0
Accepted Answers:
c) 14.24 to 14.58
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/noc20_cs06/unit?unit=12&assessment=158 4/4
3/28/2021 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 2020-04-22, 23:59 IST.
NPTEL online As per our records you have not submitted this assignment.
course work?

Week 0
1)Which of the following are themselves a collection of 1 point

different data types?


Week 1
a) String
Week 2 b) Array
c) Character
Week 3 d) Structure
Week 4 No, the answer is incorrect.
Score: 0
Accepted Answers:
Week 5
d) Structure
Week 6

Week 7

Week 8

Week 9

Week 10

Week 11

Week 12

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=13&assessment=159 1/7
3/28/2021 Problem solving through Programming In C - - Unit 14 - Week 12

2) 1 point
Lecture 56 :
Structure
(Contd.) (unit?
unit=13&lesson=70)

Lecture 57 :
Structure with
typedef (unit?
unit=13&lesson=71)

Lecture 58 :
Pointer (unit?
unit=13&lesson=72)

Lecture 59 :
Pointer
(Contd.) (unit?
unit=13&lesson=73)

Lecture 60 :
Pointer in
Structures
(unit?
unit=13&lesson=74)
a) 1111011
Lecture 61 :
b) 1111101
Dynamic
Allocation and c) 1110111
File (unit? d) 1110011
unit=13&lesson=75)
No, the answer is incorrect.
Quiz : Score: 0
Assignment Accepted Answers:
12
(assessment?
b) 1111101
name=159)

Week-12
Problem-01
(/noc20_cs06/progassignment?
name=177)

Week-12
Problem-02
(/noc20_cs06/progassignment?
name=178)

Week-12
Problem-03
(/noc20_cs06/progassignment?
name=179)

Week-12
Problem-04
(/noc20_cs06/progassignment?
name=180)

Week-12
Problem-05
(/noc20_cs06/progassignment?
name=181)

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=13&assessment=159 2/7
3/28/2021 Problem solving through Programming In C - - Unit 14 - Week 12

Feedback For 3) 1 point


Week 12
(unit?
unit=13&lesson=184)

DOWNLOAD
VIDEOS

Assignment
Solution

December 4
Programming
Test

December 4
programming
test session 2

a) Error
b) 01234
c) 12345
d) 01223
No, the answer is incorrect.
Score: 0
Accepted Answers:
d) 0 1 2 2 3

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=13&assessment=159 3/7
3/28/2021 Problem solving through Programming In C - - Unit 14 - Week 12

4) 1 point

a) 19 19 11
b) 7 7 11
c) 9 7 11
d) 19 7 11
No, the answer is incorrect.
Score: 0
Accepted Answers:
d) 19 7 11
5) 1 point

a) 2036 2036 2036


b) 2012 4 2204
c) 2036 10 10
d) 2012 4 6
No, the answer is incorrect.
Score: 0
Accepted Answers:

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=13&assessment=159 4/7
3/28/2021 Problem solving through Programming In C - - Unit 14 - Week 12

a) 2036 2036 2036


6) 1 point

a) if the memory has been allocated to the pointer “ptr”


successfully
b) if the memory could not be allocated to the pointer
“ptr”
c) it will never print
d) None
No, the answer is incorrect.
Score: 0
Accepted Answers:
b) if the memory could not be allocated to the pointer “ptr”
7) 1 point

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

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=13&assessment=159 5/7
3/28/2021 Problem solving through Programming In C - - Unit 14 - Week 12

No, the answer is incorrect.


Score: 0
Accepted Answers:
c) 8
8) 1 point

a) The first character in the file


b) A structure which contains a char pointer which points to
the first character of a file.
c) The name of the file.
d) The last character in the file
No, the answer is incorrect.
Score: 0
Accepted Answers:
b) A structure which contains a char pointer which points to the
first character of a file.
9) 1 point

a) 10
b) a
c) address of a
d) compilation error
No, the answer is incorrect.
Score: 0
Accepted Answers:
d) compilation error

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=13&assessment=159 6/7
3/28/2021 Problem solving through Programming In C - - Unit 14 - Week 12

10) 1 point

a) True
b) False
c) No output
d) Compilation error
No, the answer is incorrect.
Score: 0
Accepted Answers:
a) True

https://onlinecourses.nptel.ac.in/noc20_cs06/unit?unit=13&assessment=159 7/7

You might also like