47

One of my friend does this legendary thing in exam😂

Comments
  • 14
    The funny thing is that the legend is more optimized (should be only one print) because you assume that you know how much you need at compile time. ^^
  • 11
    Kids are coding like that cause their teachers want them to do it like that😂 but a legend gives his clients legendary code
  • 11
    @Celes yes and no. Compilers are your friends! Compilers can do loop unrolling and such. There's a high chance a compiler will turn it in quite similar code.

    However, the output of the code on the left and on the right are not identical! So if the output was specified to be exactly as the one on the left, the right one would fail big time. Besides when writing it like that why have different print statements and not just one?
  • 5
    A friend of mine did this instead of outputting all chars, he copied the entire ASCII table from wikipedia. Our teacher was not amused 😁
  • 3
    My teacher was dumb enough to not catch such guys.
    They all left coding after graduation tho.
  • 8
    printf("*\n**\n***\n****\n*****\n");
Add Comment