[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

You Should Be Able To Solve This

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 14
Thread images: 3

File: f37g1q14g1.gif (2KB, 219x136px) Image search: [Google]
f37g1q14g1.gif
2KB, 219x136px
How many times does the function print out it's message?
>>
File: 1455955504476.png (53KB, 240x193px) Image search: [Google]
1455955504476.png
53KB, 240x193px
What is the value sent to the parameter n
>>
You right I forgot to mention that! n is set to 5.
>>
Depends on the OS.
>>
Depends on how wide the type "int" is and if you have enough memory to hit integer overflow before stack overflow.
>>
File: 1472350607676.jpg (61KB, 486x459px) Image search: [Google]
1472350607676.jpg
61KB, 486x459px
>>1521485
>ShowMessage(n+1);
If n is set to 5, then the message will show 6 times
>>
>>1521495
Assume we're running a Turing machine with 5 miles of tape.
>>
until the computer runs out of memory or there is an integer overflow right? it just keeps printing the message on and on
>>
>>1521960
i mean a stack overflow would happen before either of those i think, i am a brainlet...
>>
If it stack overflows it's just going to go all the way back to negatives and work it's way up again.
>>
>>1521963
no it isn't, n > 0
>>
O, didn't read.
If int is 2 bytes then 2^16 / 2 - 1 will be the max iterations
If int is 4 bytes then 2^32 / 2 - 1 will be the max iterations
>>
>>1521968
Oh wait... it can only start from 1 so it's probably -2... IDK...
>>
>>1521485
Thread posts: 14
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.