Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1
Arrays have fixed size and store the same type of elements so that it occupies a fixed amount of space on disk. You always have to specify the type of elements and the length of the array when you declare it, whereas vectors are dynamic, their length is not fixed and can contain the different type of elements. Hope this helps.
22nd Sep 2018, 2:51 PM
Harmeet Singh Bhatia
Harmeet Singh Bhatia - avatar