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

What is buffering in c++?

1059


Is c++ low level?

1030


How is computer programming useful in real life?

1056


What are shallow and deep copies?

1110


Which is not an ANSII C++ function a) sin() b) tmpnam() c) kbhit()

1529


Can c++ be faster than c?

1030


What is singleton class in c++?

1041


If dog is a friend of boy, is boy a friend of dog?

981


Why we use #include conio h in c++?

1042


Explain the difference between realloc() and free() in c++?

1012


Is c++ vector dynamic?

1106


Explain what happens when a pointer is deleted twice?

1252


Explain the differences between list x; & list x();.

1005


What is data structure in c++?

1142


What kind of problems can be solved by a namespace?

1090