• The caller must ensure that the destination range is big enough or that insert iterators are used. • Since C++11, generate_n() returns the position after the last modified element (beg+num) or beg if num is negative (before C++11, generate_n() had return type void). • Complexity: linear (numElems, num, or 0 calls of op() and assignments). Thefollowingprogramdemonstrateshowtousegenerate()andgenerate_n() toinsertorassign some random numbers