1.

Which is the best way to generate numbers between 0 to 99?(a) rand()-100(b) rand()%100(c) rand(100)(d) srand(100)I had been asked this question in an international level competition.This interesting question is from Random Number Generation in portion Input and Output in C of C

Answer»

The CORRECT OPTION is (b) rand()%100

Easy explanation - NONE.



Discussion

No Comment Found

Related InterviewSolutions