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
Can the operator == be overloaded for comparing two arrays consisting of characters by using string comparison?
What is the protected keyword used for?
What is the arrow operator in c++?
Why is main an int?
What are proxy objects in c++?
Can we overload operator in c++?
Describe about storage allocation and scope of global, extern, static, local and register variables?
Write a program to concatenate two strings.
In c++, what is the difference between method overloading and method overriding?
What is the difference between the functions rand(), random(), srand() and randomize()?
What is c++ w3school?
What is c++ best used for?
Does c++ have a hash table?
How should a contructor handle a failure?
Explain about vectors in c ++?