Hey, @abhishek_1401 you said you had mentioned the data type of the vector, so I tested it and it worked just fine on my machine.
Please check again that your code is same as-
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> v;
int i;
for(i=0;i<100000;i++)
{
v.push_back(i);
}
for(i=0;i<v.size();i++)
{
cout<<v[i]<<endl;
}
return 0;
}