Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the Difference between "vector" and "array"?

Answer Posted / mms zubeir

First, a vector is a template class but not the array is.
So obviously there are members to access the elements of
the vector like, range checking, iterators,
insertion/deletion, predicates, etc.

Since it is a template class, the same implementation can
be used for any type including pointers, objects/user
defined types.

Second, as said by others, vector automatically grow as we
invoke push_back(), we can reserve additional space for
elements, etc.

Is This Answer Correct ?    18 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Distinguish between a # include and #define.

1093


What is the two main roles of operating system?

986


Can the creation of operator** is allowed to perform the to-the-power-of operations?

958


Give example of a pure virtual function in c++?

1103


Which format specifier is used for printing a pointer value?

1017


What is c++ & why it is used?

1037


Explain stack & heap objects?

1001


What is name hiding in c++?

1124


Explain linear search.

1010


What are the benefits of pointers?

993


Difference between a copy constructor and an assignment operator.

954


What are the 3 levels of programming languages?

1001


Which programming language's unsatisfactory performance led to the discovery of c++?

1283


What is the difference between struct and class?

1450


Mention the ways in which parameterized can be invoked. Give an example of each.

1016