What is the Difference between "vector" and "array"?
Answer Posted / kabitirtha koley
The basic difference between those two are:
1.Vector and Arraylist are grownable or shinkable where are
array is not.
2.Vector and Arraylist are implemented from List interface
where as array is a primitive data type
3.Vector is Synchrnized where as arraylist is not
4.For best performance better to use arraylist than vector
| Is This Answer Correct ? | 14 Yes | 4 No |
Post New Answer View All Answers
What is a try block?
Write a program using display() function which takes two arguments.
What are dynamic type checking?
Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == ) y-= 7; else y = 8; if the value of x is 4 before the nested IFs are executed, what is the value of y after the nested IFs are executed?
What is Destructor in C++?
What is null pointer and void pointer and what is their use?
Why ctype h is used in c++?
Is linux written in c or c++?
Write about the access privileges in c++ and also mention about its default access level?
Explain one-definition rule (odr).
Does c++ cost money?
Give an example of run-time polymorphism/virtual functions.
How do you find out if a linked-list has an end? (I.e. The list is not a cycle)
Explain about Virtual Function in C++?
What is the main purpose of overloading operators?