Activity for Lundinâ€
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Answer | — |
A: Reverse an ASCII string C (gcc), 62 bytes main(){char b[99],p=strchr(gets(b),0);for(;p-->b;)putch(p);} This relies on the usual gcc extension abuse. It assumes that max user input is 98 characters + null term, since this wasn't specified. EDIT: Revisited, function-based equivalent of the above (plus I have ... (more) |
— | over 3 years ago |
Answer | — |
A: 1, 2, Fizz, 4, Buzz! C (gcc), 108 bytes ```c h,i;main(){for(;i++<100;){char s[]="%dFizzBuzz ",b=i%5;h=s+2;printf(s+(i%3?b?h=32,0:6:b?h[1]=32,2:2),i);}} ``` Godbolt. Works on clang too. Contains some serious abuse of all that is holy: gcc extensions, misaligned writes, endianess, poorly-defined behavior... New... (more) |
— | over 3 years ago |
Answer | — |
A: What is the Q&A category for? I was thinking the same thing. Maybe instead there should be one category for code golf and leave the main Q&A is for other types of challenges and puzzles? (more) |
— | over 3 years ago |
Answer | — |
A: Bytes to Segfault C (compliant), 19 bytes (`gcc -std=c18 -pedantic-errors`) ```c int main(){main();} ``` Godbolt (more) |
— | over 3 years ago |
Question | — |
What are the rules of programming language compliance? Code Golf seems like a fun idea to me, since I'm a programmer by trade and "language lawyer" nerd as a hobby. But every time I checked the code golf site on SE, I dismissed it as nonsense, because the vast majority of all programs that were posted & highly up-voted there won't even compile on the... (more) |
— | over 3 years ago |
- ← Previous
- 1
- 2
- Next →