Sonstiges

For Seong

lach mal wieder:

1.

spod wrote:
// loop forever
for( unsigned __int64 i = 1; i !=0; i++ )
{
// do something that takes about 1/100 sec.
}

kind of hard to argue that it’ll ever finish but…

2.

Won’t it finish when it overflows?

3.

Yes, in about (UNSIGNED_INT_64_MAX / 100) seconds – a little under six billion years.

Über den Autor

Robert Basic

Robert Basic ist Namensgeber und Gründer von BASIC thinking und hat die Seite 2009 abgegeben. Von 2004 bis 2009 hat er über 12.000 Artikel hier veröffentlicht.