how to initialise a vector in c++ with fixed size and value code example Example: how to initialize vector in c++ with all elements 0 vector<int> arr(10,0);