Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Or compile

    char*M,A,Z,E=40,J[40],T[40];main(C){for(*J=A=scanf(M="%d",&C);
    --            E;             J[              E]             =T
    [E   ]=  E)   printf("._");  for(;(A-=Z=!Z)  ||  (printf("\n|"
    )    ,   A    =              39              ,C             --
    )    ;   Z    ||    printf   (M   ))M[Z]=Z[A-(E   =A[J-Z])&&!C
    &    A   ==             T[                                  A]
    |6<<27<rand()||!C&!Z?J[T[E]=T[A]]=E,J[T[A]=A-Z]=A,"_.":" |"];}
with -fwritable-strings -Wno-implicit-function-declaration and watch a maze of the input height being generated on the fly.


> gcc: error: unrecognized command-line option ‘-fwritable-strings’; did you mean ‘-Wwrite-strings’?

this doesn't work with gcc 4

> GCC no longer accepts the -fwritable-strings option. Use named character arrays when you need a writable string.

https://gcc.gnu.org/gcc-4.0/changes.html


Clang still accepts -fwritable-strings.

For gcc, writable strings can be avoided by making the top line one character longer:

    char M[3],A,Z,E=40,J[40],T[40];main(C){for(*J=A=scanf("%d",&C);




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: