What is different between array and list?



What is different between array and list?..

Answer / Swami Saran

In C#, arrays and lists are both used for storing collections of elements. However, there are some differences between them. Arrays have a fixed size at creation time, which cannot be changed during runtime. On the other hand, lists can grow or shrink dynamically as elements are added or removed from them. Additionally, arrays provide faster access to elements using index-based syntax (array[index]), while lists provide more flexible access to elements using iterator-based methods (such as GetEnumerator()).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

Can you have an arraylist of arrays?

1 Answers  


What is meant by heap sort?

1 Answers  


Does hashmap allow null keys?

1 Answers  


Is a list an array?

1 Answers  


Which is the parent class of linkedhashset class?

1 Answers  


Evaluate the following prefix expression " ++ 26 + - 1324"

24 Answers   College School Exams Tests, Patni,


Calculate the efficiency of sequential search?

1 Answers  


Can we extend an array after initialization?

1 Answers  


What are the types of Collision Resolution Techniques and the methods used in each of the type?

1 Answers  


How do you find the complexity of a bubble sort?

1 Answers  


Define an algorithm. What are the properties of an algorithm? What are the types of algorithms?

1 Answers  


input function and output function in c language

2 Answers   TCS,


Categories