1.

What is linear_congruential_engine?(a) Pseudo-random number engine that generates random unsigned integers in the range [0, 2^w-1] for some w using Mersenne Twister algorithm(b) Pseudo-random number engine that generates random unsigned integers(c) Pseudo-random number engine that generates random unsigned integers in the range [0, 2^w-1] for some w using lagged Fibonacci generator(d) Pseudo-random number engine that generates random signed integers in the range [0, 2^w-1] for some w using Mersenne Twister algorithmI had been asked this question by my college professor while I was bunking the class.This interesting question is from Generators topic in portion Class Hierarchies, Library & Containers of C++

Answer»

Correct answer is (b) Pseudo-RANDOM NUMBER engine that GENERATES random unsigned integers

For explanation: linear_congruential_engine is a SIMPLE Pseudo-random number engine that generates random unsigned integer using the basic algorithm.



Discussion

No Comment Found

Related InterviewSolutions