vector<int> degree(N+1,0); code example Example: how to initialize vector in c++ with all elements 0 vector<int> arr(10,0);