Difference between vector and array

Answer Posted / xxx

vector is also an array but the size of a vector can change
dynamically where in array its fixed.

we can create some reserve space in vector where in array we
cannot.

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).

1908


What is the point of polymorphism?

787


What is the difference between encapsulation and polymorphism?

853


What is the real life example of polymorphism?

866


Can we create object of interface?

858


What exactly is polymorphism?

880


What is ambiguity in inheritance?

863


Why is abstraction needed?

770


What is byval and byref? What are differences between them?

1964


What is the real time example of inheritance?

879


What is encapsulation example?

786


Whats oop mean?

799


Plese get me a perfect C++ program for railway/airway reservation with all details.

3678


What is a superclass in oop?

924


Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

944