I mean what is the advantage of this vs
int i = rand() % q;
?