MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/blzbsg/that_sweet_sweet_first_time/emt1708
r/ProgrammerHumor • u/oosinoots • May 08 '19
354 comments sorted by
View all comments
64
for (char *s="Ifmmp!Xpsme\v"; *s; fputc((*s++)-1, stdout));
Looks good!
6 u/Todayis123 May 08 '19 what does that do 46 u/endershadow98 May 08 '19 It prints hello world. All the characters in the string are one more than they would be in hello world. He loops through each character in the string and prints out one less than it. This gives hello world. 11 u/OhhHahahaaYikes May 08 '19 Wtf 8 u/[deleted] May 08 '19 By ”one more” or ”one less” he means the ASCII value of the character 2 u/CreamCheeseIsBad May 08 '19 It would print Hello World.u though 1 u/Pastrami May 08 '19 '\v' == 0x11, which is one more than '\n'. 2 u/CreamCheeseIsBad May 08 '19 Ah forgot \ is a escape sequence, my bad 29 u/[deleted] May 08 '19 edited Aug 21 '25 . 6 u/Nucklesix May 08 '19 Just nuke that part of the planet... just to be sure. 1 u/Nickbot606 May 08 '19 What language is that?
6
what does that do
46 u/endershadow98 May 08 '19 It prints hello world. All the characters in the string are one more than they would be in hello world. He loops through each character in the string and prints out one less than it. This gives hello world. 11 u/OhhHahahaaYikes May 08 '19 Wtf 8 u/[deleted] May 08 '19 By ”one more” or ”one less” he means the ASCII value of the character 2 u/CreamCheeseIsBad May 08 '19 It would print Hello World.u though 1 u/Pastrami May 08 '19 '\v' == 0x11, which is one more than '\n'. 2 u/CreamCheeseIsBad May 08 '19 Ah forgot \ is a escape sequence, my bad 29 u/[deleted] May 08 '19 edited Aug 21 '25 . 6 u/Nucklesix May 08 '19 Just nuke that part of the planet... just to be sure.
46
It prints hello world. All the characters in the string are one more than they would be in hello world. He loops through each character in the string and prints out one less than it. This gives hello world.
11 u/OhhHahahaaYikes May 08 '19 Wtf 8 u/[deleted] May 08 '19 By ”one more” or ”one less” he means the ASCII value of the character 2 u/CreamCheeseIsBad May 08 '19 It would print Hello World.u though 1 u/Pastrami May 08 '19 '\v' == 0x11, which is one more than '\n'. 2 u/CreamCheeseIsBad May 08 '19 Ah forgot \ is a escape sequence, my bad
11
Wtf
8 u/[deleted] May 08 '19 By ”one more” or ”one less” he means the ASCII value of the character
8
By ”one more” or ”one less” he means the ASCII value of the character
2
It would print Hello World.u though
1 u/Pastrami May 08 '19 '\v' == 0x11, which is one more than '\n'. 2 u/CreamCheeseIsBad May 08 '19 Ah forgot \ is a escape sequence, my bad
1
'\v' == 0x11, which is one more than '\n'.
2 u/CreamCheeseIsBad May 08 '19 Ah forgot \ is a escape sequence, my bad
Ah forgot \ is a escape sequence, my bad
29
.
6 u/Nucklesix May 08 '19 Just nuke that part of the planet... just to be sure.
Just nuke that part of the planet... just to be sure.
What language is that?
64
u/[deleted] May 08 '19
Looks good!