Quiz on C++ Algorithm: Generate N



1. What is the purpose of the generate_n function in C++?
2. Which header file is required to use the generate_n function?
3. What type of iterator can be used with generate_n?
4. What does the first argument of generate_n represent?
5. Which of the following is a valid example of using generate_n?

Advertisements