# Data Structure And Algorithms Using Java Assignment 3 Answers 2022

In this post we have provided answers of NPTEL Data Structure And Algorithms Using Java Assignment 3. We provided answers here only for reference. Plz, do your assignment at your own knowledge.

## NPTEL Data Structure And Algorithms Using Java Assignment 3 Answers 2022

1. What will be the output of following:

int arr [] = new int[];
System.out. println (arr) ;

a. Garbage Value
c. Compile time Error
d. None of the above

`Answer:- c`

2. What is the output of the followving code snippet? int arr [] = new int System. out. println (arr) ;

a. Garbage Value
b. Reference Value
c. Compile time Error
d. None of the above

`Answer:- b`

3. What is the output of the following code snippet?

int arr [] = new int[-5]

a. Compilation Error
b. Logical Error
C. Exception
d. None of the above

`Answer:- c`

4. Is the statement in red a legal statement?
int[] a = new int:
int[] b = new int:

a =b; //22

a. Legal Statement
b. Compile time error
c. Runtime error
d. None of these

`Answer:- a`

5. Which of the following is not a legal declaration of array?

a. int arr|]= new int:
b. int| arr = new int:
C. int arr[|]= {1,2,3,4,5};
d. int arr[]= new int{1,2,3};

`Answer:- d`

6. Which of the followving is a linear Data Structure?

a. Array
b. Graph
c. Binary Tree
d. Heap Tree

`Answer:- a`

7. What will be the output of the given command? int arr[] = new int; System.out.print(arr);

a. Compile Time Error
b. Garbage Value
d. ArrayIndexOutOfBoundsException

`Answer:- d`

8. What is the default value of Object type array?

a. 0
b. ” “
c. False
d. null

`Answer:- d`

9. Which of the following returns the length of an Array?

a. length
b. length()
c. size()
d. len()

`Answer:- a`

10. Which of the following statement is ?

a. Size of an array can be declared at runtime
b. Array is a dynamic data structure.
c. Same Array can store different data types
d. Array is a collection of similar types of elements.

`Answer:- d`

## About Data Structure And Algorithms Using Java

With the growth of Information and Communication Technology, there is a need to develop large and complex software. For developing large software, software developers should have enough proficiency of data structures and algorithms. Further, those software should be platform independent, Internet enabled, easy to modify, secure, and robust. To meet this requirement object-oriented paradigm has been developed and based on this paradigm the Java programming language emerges as the best programming environment.

Now, Java programming language is being used for mobile programming, Internet programming, and many other applications compatible to distributed systems. This course aims to cover the essential topics of data structures and algorithms and how the same can be implemented using Java programming language. The participants of the proposed course will be able to improve their skills, to cope with the current demand of IT industries and solve many problems in their own filed of studies.

### COURSE LAYOUT

• Week 1: 1D array, list and vector, 2D matrices and tables of objects
• Week 2: Java implementation of 1D and 2D arrays and its operations
• Week 3: Linked lists and its various operations, stack and queue
• Week 4: Java implementation of linked lists, stack and queue
• Week 5: Binary trees: Representation and operations. Variations of binary tree: Binary search tree, Height balanced search tree, Heap tree
• Week 6: Java implementation of binary trees and its variations
• Week 7: Graph : Structure, representation and operations
• Week 8: Java implementations of graph data structures
• Week 9: Algorithms (Part-I): Searching and sorting algorithms
• Week 10:Java implementation of Part-I algorithms
• Week 11:Algorithms (Part-II): Greedy algorithms, shortest path algorithms
• Week 12:Java implementation of Part-II algorithms

CRITERIA TO GET A CERTIFICATE

Average assignment score = 25% of average of best 8 assignments out of the total 12 assignments given in the course.
Exam score = 75% of the proctored certification exam score out of 100

Final score = Average assignment score + Exam score

YOU WILL BE ELIGIBLE FOR A CERTIFICATE ONLY IF AVERAGE ASSIGNMENT SCORE >=10/25 AND EXAM SCORE >= 30/75. If one of the 2 criteria is not met, you will not get the certificate even if the Final score >= 40/100.