• save_vs_death [they/them]
    ·
    10 months ago

    The correct answers are:

    1. implementation defined
    2. implementation defined
    3. implementation defined
    4. implementation defined
    5. undefined behaviour

    Which is a lot more precise than "nasal demons", because at the end of the day, code gets compiled by a specific compiler toolchain for a specific platform and all these potentialities get collapsed.

  • AntiOutsideAktion [he/him]
    ·
    edit-2
    10 months ago

    Hell yeah I know C. Let's go.

    First question. Oh easy. Lemme just lookup 'sizeof'....

  • AlkaliMarxist
    ·
    10 months ago

    100% correct! I’m going to start calling myself a guru and condescendingly refusing to answer anyone’s questions. Now where’s my tshirt with the picture of tux on it?

  • Zvyozdochka [she/her, pup/pup's]
    ·
    10 months ago

    And this is why we use Rust! Though, C will always hold a special place in my heart and I still love it. Sure, it's dangerous and what not and it's easy to shoot yourself in the foot or whatever the new saying is these days, but there's something really fun about having almost zero guard rails and having the ability to just do anything.

    • footfaults
      ·
      edit-2
      21 hours ago

      deleted by creator

    • dat_math [they/them]
      ·
      10 months ago

      there's something really fun about having almost zero guard rails and having the ability to just do anything.

      imo this makes it such a useful tool for learning computer programming

      • Zvyozdochka [she/her, pup/pup's]
        ·
        10 months ago

        Agreed! C is the language I recommend to people if they want to learn how things work at a low level since you're basically one step above raw assembly. It was one of the first languages I learned and helped a lot with understanding things later on when working with other languages.