re: Challenge: Write a program that never stops VIEW POST

FULL DISCUSSION
 

C++

#define ever ;;
int main() {
  for(ever);
}
int main() {
    for (unsigned i = 341; i > 0; --i) {
        printf("%u\n", i--);
    }
}
int main() {
    float f = 1.0f;
    while (f < 16777218.2f) {
        printf("%f\n", f);
        f += 1;
    }
}

assembler

main:
.L2
  jmp .L2

C

int main(void) {
    int b=0, a[] = {0,1};
    while (b != (!b)[a]) {
        printf("%i\n", b=!a[b]);
    }
}
int main(void) {
  https://dev.to
  goto https;
}
 
 
 

I really like the last one. Defining a label to a comment - nice :D

code of conduct - report abuse