What is the Difference between "vector" and "array"?
Answer Posted / saroj das ,
as we know in C++ the size of array is fixed in compile
time .so the size of array cannot be adjusted at run time
to accommodate changeling program .
but vector can solve this problem allocating memory as
needed. although vector is dynamic
Is This Answer Correct ? | 48 Yes | 10 No |
Post New Answer View All Answers
What are static and dynamic type checking?
Can a list of string be stored within a two dimensional array?
What is function declaration in c++ with example?
What are signs of manipulation?
What is scope operator in c++?
What is format for defining a structure?
Why isn't sizeof for a struct equal to the sum of sizeof of each member?
Explain shallow copy?
Specify some guidelines that should be followed while overloading operators?
Explain what is class definition in c++ ?
How is c++ used in the real world?
Explain the difference between struct and class in terms of access modifier.
Define Virtual function in C++.
what are the iterator and generic algorithms.
Can comments be longer than one line?