• Drekaridill@lemmy.wtf
    link
    fedilink
    arrow-up
    27
    ·
    4 days ago

    I was a TA in a class that expected knowledge of C. A lot of students who had only ever used Python asked if I could ring them up to speed. One student even asked if he could write it in Python and then I could “just translate it over”

    • Jankatarch@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      2 days ago

      Tbf I blame whoever did was planning the prerequisites. CS majors actively wish NOT to learn any more languages than they physically have to in my experience.

    • Dumhuvud@programming.dev
      link
      fedilink
      English
      arrow-up
      10
      ·
      4 days ago

      It’s rather trivial to translate Python to C:

      $ cat << EOF > ./shitpost.c && gcc -O2 -o ./shitpost ./shitpost.c && ./shitpost
      #include <stdlib.h>
      
      int main(int argc, char** argv) {
          system("python3 -c \\"print(\\\\\\"Hello, World!\\\\\\")\\"");
          return 0;
      }
      EOF
      Hello, World!
      

      My C is a bit rusty though, sorry.