Can v.reserve() be writen is other way?

vector < int > v(120)

vector< int > v

v.reserve(120)

are theey both same???

hello @manthan.joshi.jiit
no they are not.
try to print their sizes to observe the difference.

so v(120) assigns 120 spaces with 0’s and v.reserve(120) only allocates?

yeah right… . . …