In my compute, the function rand(); in C language outputs a 32-bit number.
Is the following code will generate a random uint_8 number? Or it can be platform-dependent?
uint8_t var=(uint8_t) rand();
I don't want to use modulo operation, due to time complexity of calculating modulo.