Programming in Java - - Unit 10 - Week 7 _
Programming in Java - - Unit 10 - Week 7 _
(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)
Week 4 : () a. 0
b. 1
Week 5 : ()
c. -1
d. Null
Week 6 : ()
No, the answer is incorrect.
Week 7 : () Score: 0
Accepted Answers:
Lecture 31 : I- c. -1
O Stream-II
(unit? 3) What will be the output of the following Java program? 1 point
unit=66&lesso
n=67)
https://onlinecourses.nptel.ac.in/noc24_cs105/unit?unit=66&assessment=436 1/5
13/11/2024, 15:27 Programming in Java - - Unit 10 - Week 7 :
Lecture 32 : I-
O Stream-III
(unit?
unit=66&lesso
n=68)
Lecture 33 :
Demonstration
-XII (unit?
unit=66&lesso
n=69)
Lecture 34 :
Applet
Programming -
I (unit?
unit=66&lesso
n=70)
Lecture 35 : a. abc
Applet
b. abcd
Programming -
II (unit? c. abcde
unit=66&lesso d. abcdef
n=71)
No, the answer is incorrect.
Feedback Score: 0
Form (unit? Accepted Answers:
unit=66&lesso a. abc
n=72)
4) What is the purpose of a ByteArrayOutputStream in Java? 1 point
Quiz: Week
07: a. To write binary data to an output stream
Assignment
b. To read binary data from an input stream
07
(assessment? c. To convert characters to bytes
name=436) d. To store binary data in memory
Week 07 :
a. public void read(int b)throws IOException{{
Programming
Assignment 2 b. public int read(byte[ ] b)throws IOException{}
(/noc24_cs105 c. public void read(byte[ ] b)throws IOException{}
/progassignme
d. public int read(int b)throws IOException{}
nt?name=398)
No, the answer is incorrect.
Week 07 : Score: 0
Programming Accepted Answers:
Assignment 3 b. public int read(byte[ ] b)throws IOException{}
(/noc24_cs105
/progassignme
6) Which method is used to create a directory with fileattributes? 1 point
nt?name=399)
a. Path.create()
https://onlinecourses.nptel.ac.in/noc24_cs105/unit?unit=66&assessment=436 2/5
13/11/2024, 15:27 Programming in Java - - Unit 10 - Week 7 :
Week 07 : b. Path.createDirectory()
Programming
c. Files.createDirectory(path, fileAttributes)
Assignment 4
(/noc24_cs105 d. Files.create(fileAttributes)
/progassignme No, the answer is incorrect.
nt?name=400) Score: 0
Accepted Answers:
Week 07 :
c. Files.createDirectory(path, fileAttributes)
Programming
Assignment 5 7) What will be the output of the following Java program? 1 point
(/noc24_cs105
/progassignme
nt?name=401)
Week 07 :
Assignment
Solution (unit?
unit=66&lesso
n=441)
Week 8 : ()
Week 9 : ()
Week 10 : ()
Week 11 : () a. 20
b. 100
Week 12 : ()
c. 1000
Books () d. 2
8) Which class is used to write primitive data types to an output stream in Java? 1 point
a. DataOutputStream
b. ObjectOutputStream
c. OutputStream
d. PrintWriter
https://onlinecourses.nptel.ac.in/noc24_cs105/unit?unit=66&assessment=436 3/5
13/11/2024, 15:27 Programming in Java - - Unit 10 - Week 7 :
a. 42
b. 35
c. 7
d. 0
https://onlinecourses.nptel.ac.in/noc24_cs105/unit?unit=66&assessment=436 4/5
13/11/2024, 15:27 Programming in Java - - Unit 10 - Week 7 :
https://onlinecourses.nptel.ac.in/noc24_cs105/unit?unit=66&assessment=436 5/5