1. C++ program with a heap buffer overflow
a. Look at the following program that exploits a shortcoming ofSTL vectors (which uses the heap) and iterators. Compile and runthe program. Try at least three different scenarios:
#include<iostream>#include<vector>#include<stdlib.h>/** People sometimes get the false impression that because STL and iterators * are fairly new additions to C++, they do sensible, commonplace things like * bounds checking. * * This is sadly not the case, since preserving backwards-compatibility with C * means preserving the loaded-gun-pointed-at-your-foot aspects, too. * * A semi-common related problem is to have doubles take on impossibly
OR
OR