this is my C ++ function that uses the bit type:
int genkey(const unsigned char a,const char b,const char c ) { int val=0; unsigned char *p= reinterpret_cast <unsigned char *>(&val); p[0]=a; char *q= reinterpret_cast <char *>(&val); q[1]=b; q[2]=c; return val; }
I use this to generate keys (unique value for the object).
The range of values ββthat can be passed to the function: for parameter => [0..255], for parameter b => [0..127] and for parameter c = = [0 .. 127].
Suppose a function can only be called once with the same three argument values. For example, there will be only one call with values ββ(10, 0, 0).
Does the function return duplicate values?
Thanks.
source share