What is the difference between an ARRAY and a LIST in C++?

Answer Posted / nashiinformaticssolutions

Although lists and arrays are both used to store data, they differ in a few important ways. These consist of:

• A list's size is changeable, but an array's is fixed.
• While a list allows sequential access, in which the user must navigate through the elements to locate a given index, an array allows random access using indexes.

• While a list can store entries in any memory location, an array stores elements in contiguous memory.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is there a sort function in c++?

766


What is polymorphism explain?

963


What are the four partitions in which c++ compiler divides the ram?

982


Discuss about iteration statements in C++ .

717


How do you establish a has-a relationship?

816


What is class in c++ with example?

788


Can we run c program in turbo c++?

808


What is new keyword in oops?

782


What is a pdb file?

748


Explain how would you handle a situation where you cannot call the destructor of a local explicitly?

737


What is vectorial capacity?

926


what are the iterator and generic algorithms.

1722


Why is static class not inherited?

817


Which bit wise operator is suitable for putting on a particular bit in a number?

948


What will happen if a pointer is deleted twice?

940