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
What is Advantage and Use of THIS pointer in C++ – Scenarios?
What are the two types of comments?
Is c++ pass by reference or value?
What are signs of manipulation?
What is cohesion in oop?
What is a virtual function in C++?
Which operator cannot be overloaded c++?
How important is c++?
Is c++ a high level language?
Explain the differences between private, public and protected and give examples.
Why is abstraction needed?
Reverse the Linked List. Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL
Can you write a function similar to printf()?
What is guard code in c++?
What is a linked list in c++?