Data Structures & AlgorithmsQuiz

Array and array Operations – Data Structure and Algorithm Quiz Day 01

I will, in fact, claim that the difference between a bad programmer & a good one is whether he considers his code or his data structures more important. Bad programmers worry about the code. Good programmers worry about data structures and their relationships.

Linus Torvalds (Creator of Linux)

Algorithms + Data Structures = Programs

Hello Guys, we hope you and your family are safe. Today, we have come up with a new data structure and algorithm quiz based on the array and array operations.

1. Which one of the following represents an array?  


2. Which of the following is the correct way to instantiate an array in java? 


3. Similar to above question, which of the following is the correct way to initialize an array in C? 


4. Elements/objects in present in an array are accessed ________


5. Usually, the index for the first element of an array is _______? 


6. Which of the following concepts make compressive use of an array? 


7. If int is 6 Bytes, what is the size of int arr[20]


8. When does the exception named “ArrayIndexOutOfBoundException” occur? 


9. What is the output of following code? 


10. What is the main disadvantage of an array? 


Leave a Reply

Your email address will not be published. Required fields are marked *