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
Is atoi safe?
What is the use of this pointer in c++?
What is #include math h in c++?
You want to link a c++ program to c functions. How would you do it?
How are the features of c++ different from c?
Explain the difference between class and struct in c++?
What are the two types of comments?
What are c++ storage classes?
Define a constructor?
Which is most difficult programming language?
What is #include iostream in c++?
What is the difference between strcpy() and strncpy()?
Is swift faster than c++?
What is buffer and example?
Can I have a reference as a data member of a class? If yes, then how do I initialise it?