Skip to main content
deleted 294 characters in body
Source Link
Doorknob
  • 71.7k
  • 20
  • 143
  • 385

C (gcc), 5045 bytes

f(i){for(i=0;i<26;i=0;++i<27;)printf("%*s%c\n",i++"%*c\n",""i,i+97i+96);}

While this technically invokes undefined behavior, it works with gcc 7.1.1 on my machine. It also works on Try it online!'s gcc. It does not work with clang 4.0.0 on my machine, but it does when the 97 is changedThanks to a 96.@Dennis for saving 5 bytes!

C (gcc), 50 bytes

f(i){for(i=0;i<26;)printf("%*s%c\n",i++,"",i+97);}

While this technically invokes undefined behavior, it works with gcc 7.1.1 on my machine. It also works on Try it online!'s gcc. It does not work with clang 4.0.0 on my machine, but it does when the 97 is changed to a 96.

C, 45 bytes

f(i){for(i=0;++i<27;)printf("%*c\n",i,i+96);}

Thanks to @Dennis for saving 5 bytes!

added 5 characters in body
Source Link
Doorknob
  • 71.7k
  • 20
  • 143
  • 385

C (gcc), 4850 bytes

i;ff(i){for(;i<26;i=0;i<26;)printf("%*s%c\n",i++,"",i+97);}

While this technically invokes undefined behavior, it works with gcc 7.1.1 on my machine. It also works on Try it online!'s works on Try it online!'s gccgcc. It does not work with clang 4.0.0 on my machine, but it does when the 97 is changed to a 96.

C (gcc), 48 bytes

i;f(){for(;i<26;)printf("%*s%c\n",i++,"",i+97);}

While this technically invokes undefined behavior, it works with gcc 7.1.1 on my machine. It also works on Try it online!'s gcc. It does not work with clang 4.0.0 on my machine, but it does when the 97 is changed to a 96.

C (gcc), 50 bytes

f(i){for(i=0;i<26;)printf("%*s%c\n",i++,"",i+97);}

While this technically invokes undefined behavior, it works with gcc 7.1.1 on my machine. It also works on Try it online!'s gcc. It does not work with clang 4.0.0 on my machine, but it does when the 97 is changed to a 96.

Source Link
Doorknob
  • 71.7k
  • 20
  • 143
  • 385

C (gcc), 48 bytes

i;f(){for(;i<26;)printf("%*s%c\n",i++,"",i+97);}

While this technically invokes undefined behavior, it works with gcc 7.1.1 on my machine. It also works on Try it online!'s gcc. It does not work with clang 4.0.0 on my machine, but it does when the 97 is changed to a 96.