Can we overwrite a vector element at i index?

just like in arrays simply
a[5]=17;
can we overwrite any element in a vector by any method?

@rhythm1318
Yes you can
Vector is like an array only
With added advantage of changing size

what is the syntax for that ? same syntax ?

@rhythm1318
Yes exactly same

If your doubt is resolved please close it