Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Timeline for "Hello, World!"

Current License: CC BY-SA 4.0

11 events
when toggle format what by license comment
S Dec 28, 2022 at 2:43 history suggested Community Bot CC BY-SA 4.0
Add TIO link
Dec 28, 2022 at 1:20 review Suggested edits
S Dec 28, 2022 at 2:43
Jun 16, 2022 at 0:37 comment added c-- @Random832 for the latter int puts();int main(){puts("Hello, World!");} is 45 bytes, +5 if char* is required
Jun 21, 2020 at 15:31 comment added mreff555 main(){puts(_FILE_"!");} with a file name of "Hello, World" is 26 bytes.
Jun 17, 2020 at 9:04 history edited Community Bot
Commonmark migration
Jun 20, 2017 at 21:23 comment added CalculatorFeline Actually, by 2017 rules those would be 34 and 38 bytes respectively.
Sep 3, 2015 at 8:12 comment added C0deH4cker @matega That is clearly cheating. For it not to be cheating you'd have to make the file contain only __FILE__ (8 bytes) and name the file main(){puts("Hello, World!");}. Then it is totally not cheating ;)
Aug 29, 2015 at 19:54 comment added matega The program h is 29 bytes shorter. Note: you'll have to compile it with -Dh='main(){puts("Hello, World!");}' I'm half trolling, half amusing myself with compiler abuse.
Aug 28, 2015 at 19:56 comment added lynn @Random832: for the former, main(){return!puts("Hello, World!");} is two bytes shorter.
Aug 28, 2015 at 16:29 comment added Random832 It's not worth a separate answer, but the fully ISO compliant C89 and C99 answers are 39 main(){puts("Hello, World!");return 0;} and 53 #include <stdio.h> int main(){puts("Hello, World!");} bytes respectively. Slightly more if you think main(void) is required.
Aug 28, 2015 at 12:40 history answered LambdaBeta CC BY-SA 3.0

AltStyle によって変換されたページ (->オリジナル) /