Is it necessary to specify the size of the vector while declaring it. If not then what will be the size of it before assigning any value and how memory is allocated when giving it some value. If yes, then is it necessary to initialize then only. Kindly tell by giving code.
Vectors declaration
hello @f20180999
if u dont specify the vector size and it will be empty and its size will be 0.
it internally use dynamic array , u will understand this in later part of vide
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.