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



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

Answer / 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

More C++ Interview Questions

Explain the difference between method overriding and method overloading in C++?

0 Answers   Accenture,


What is an abstract class in C++

0 Answers   SwanSoft Technologies,


Explain the difference between C and C++.

0 Answers   Accenture,


Define type casting in C++.

0 Answers   Amdocs,


Explain the FOR loop with a help of a code.

0 Answers   Accenture,


Discuss the role of C++ shorthands.

0 Answers   Adobe,


How will you execute a stack using a priority queue? (Push and pop should be in O (1)).

0 Answers   Adobe,


Explain why C++ is not purely Object Oriented Language

0 Answers   Aspire,


Question on Copy constructor.

0 Answers   Alter,


Write a program to generate the Fibonocci Series in C++.

0 Answers   Accenture,


Identify the error in the following program. include<iostream> using namespace std; void main() { int num[]={1,2,3,4,5,6}; num[1]==[1]num ? cout<<"Success" : cout<<"Error"; }

1 Answers  


What are Agilent PRECOMPILERS?

0 Answers   Agilent,


Categories