RAND_MAX for my system is 32767 so rand() cannot generate an integer greater than this. The only method I think would work is
Is there any other way?Code:int generateRandomInt() { int randomInt=0; for (int i=0; i<536; ++i) randomInt+=rand(); return randomInt; }