What is the Difference between "vector" and "array"?
Answer Posted / namitha
Vectors are a kind of sequence containers. As such, their
elements are ordered following a strict linear sequence.
Vector containers are implemented as dynamic arrays; Just as
regular arrays, vector containers have their elements stored
in contiguous storage locations, which means that their
elements can be accessed not only using iterators but also
using offsets on regular pointers to elements.
Arrays is a sequence of similar data type.
| Is This Answer Correct ? | 11 Yes | 6 No |
Post New Answer View All Answers
What is a block in c++?
Why is c++ still best?
What is std :: flush?
Explain method of creating object in C++ ?
What is runtime errors c++?
Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.
What does flush do?
What is c++ manipulator?
How long it will take to learn c++?
What is capacity in vector in c++?
What is rtti in c++?
Is c++ built on c?
Explain the difference between abstract class and interface in c++?
Define the process of error-handling in case of constructor failure?
How is c++ used in the real world?