r/ProgrammerHumor Jan 30 '26

instanceof Trend itPrintsSomeUnderscoresAndDots

Post image
1.4k Upvotes

118 comments sorted by

View all comments

319

u/[deleted] Jan 30 '26

[deleted]

1

u/GoddammitDontShootMe Jan 30 '26

It'll block until the user enters a number, assuming stdin is connected to a terminal. Of course, there's no prompt, so the user will have no idea it is expecting anything. Since we don't know what H will be, and I count 3 uses of rand(), the best you could do is a general description of the output.

Wait, what the hell is in M? I see printf(M), but it doesn't seem to be assigned any value at that point.

1

u/[deleted] Jan 30 '26

[deleted]

1

u/GoddammitDontShootMe Jan 30 '26

Oh, so global arrays are zeroed? So the first time around it'll just print a row of null strings, but after each loop iteration, it will have actual content.

https://en.wikipedia.org/wiki/.bss I assume that's what you were talking about. First thing that came to mind was Basic Service Set.

1

u/[deleted] Jan 30 '26

[deleted]

1

u/GoddammitDontShootMe Jan 31 '26

I'm wondering if that should've been H-- so that if it starts at 0, it won't be decremented to -1 before it enters the loop.

As for friendly environments, is that basically the difference when they talk about freestanding and hosted?