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
How do you initialize a string in c++?
Explain deep copy?
What is an adaptor class in c++?
Is multimap sorted c++?
What are the different types of polymorphism in c++?
How do you decide which integer type to use?
Const char *p , char const *p What is the difference between the above two?
How would you obtain segment and offset addresses from a far address of a memory location?
If a base class is an adt, and it has three pure virtual functions, how many of these functions must be overridden in its derived classes?
What is the most useful programming language?
Is c the same as c++?
Define pure virtual function?
Explain one-definition rule (odr).
What are compilers in c++?
How do you flush std cout?