CodePudding user response:
# include & lt; stdio.h>
#include
#include
Unsigned long ulrand (void) {
Return (
(((unsigned long) rand () & lt; <24) & amp; 0 xff000000ul)
| (((unsigned long) rand () & lt; <12) & amp; 0 x00fff000ul)
| (((unsigned long) rand ()) & amp; 0 x00000ffful));
}
Unsigned __int64 ullrand (void) {
Return (
(((unsigned __int64) ulrand ()) & lt; <32)
| ((unsigned __int64) ulrand ()));
}
int i;
Unsigned long ul;
Unsigned __int64 ull;
Void main () {
Srand (time (NULL));
for (i=0; i<10; I++) {
Ul=ulrand ();
Printf (" % 010 lu 0 8 x x % \ n ", ul, ul);
}
for (i=0; i<10; I++) {
Ull=ullrand ();
Printf (" % 020 i64u 0 x % 016 i64x \ n ", ull, ull);
}
}
//3971076432 0 xecb1d150
//2433428051 0 x910b2a53
//1415415336 0 x545d8628
//1312330759 0 x4e389407
//1845758378 0 x6e0409aa
//0008069933 0 x007b232d
//4202720757 0 xfa806df5
//2669855255 0 x9f22c217
//0312068736 0 x1299ca80
//2084555989 0 x7c3fccd5
//03502077880857307931 0 x3099e1472040ab1b
//16884702393146816355 0 xea52835e19b43763
//01877364819396611730 0 x1a0dbd5b45f34e92
//07839440151924835771 0 x6ccb4948756a05bb
//09471412086917299176 0 x8371371c820bfbe8
//04411255971577469925 0 x3d37edef2f321be5
//13735846279546091130 0 xbe9f876a65b7367a
//04512980766520059820 0 x3ea15418aa9927ac
//15821377118299441610 0 xdb90d2a9f1bb49ca
//15512417228822200185 0 xd7472d480398bf79