मैं निम्नलिखित कोड के बारे में एक प्रश्न है दे रही है:रैंड()% 4000000000UL केवल छोटे मान
#include <iostream>
#include <ctime>
int main(){
unsigned long int blob;
srand(time(0));
for(int counter = 0; counter <= 100; counter++) {
blob = rand() % 4000000000UL ;
std::cout << blob << std::endl;
}//for
system("pause");
return 0;
} //main
यह codepad.org पर
378332591
1798482639
294846778
1727237195
62560192
1257661042
लेकिन विंडोज 7 64bits पर जैसे बड़े मूल्यों आउटपुट, यह केवल छोटे मान (परीक्षण किया VS11 पर & कोड :: ब्लाकों संकलन)
10989
13493
13169
18581
17972
29
adv में धन्यवाद आउटपुट सी ++ सीखने में मदद करने के लिए ऐस;)