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

Answer Posted / katty

In 'vector' memory allocated(dynamically) during runtime and
for array memory allocated during compilation.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe private, protected and public?

600


what is C++ objects?

673


Can I have a reference as a data member of a class? If yes, then how do I initialise it?

704


What are function prototypes?

646


What is the use of endl in c++?

592






What is a constant? Explain with an example.

557


Who was the creator of c++?

562


Explain what are single and multiple inheritances in c++?

561


Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).

634


What is meant by the term name mangling in c++?

517


Can you pass a vector to a function?

538


How many ways can a variable be initialized into in C++?

597


Are php strings immutable?

560


Differentiate between an external iterator and an internal iterator?

572


Why can’t you call invariants() as the first line of your constructor?

555