Ad
  • Custom User Avatar

    How different is this kata from https://www.codewars.com/kata/559c7b6e3c38b1d1b900006f, except the line break requirement (which is sort of trivial) and wrapping the formatted text inside a meme?

  • Custom User Avatar

    [C] Following my issue report, I would like to suggest the following modification to the function signature:

    void decrypt(char const *msg, char *buf);
    

    Here, the input parameter msg is labelled const preventing in-place modification. The second parameter buf is an output parameter which the callee can assume is large enough to fit the result. The caller then ignores the return value of decrypt() and checks buf for the computed result.

    This setup has the following advantages:

    • The input is not modified (good programming practice)
    • The callee does not have to worry about memory allocation
    • The caller can allocate buf using any method (static, dynamic, etc.) deemed appropriate and pass that buf to the callee

    Final note: do not worry about invalidating existing solutions, and apply this change to NASM (and C++, if you are using char *) as well if you decide to implement this suggestion.

  • Custom User Avatar

    String translation is a duplicate.