Ad
  • Custom User Avatar

    No worries, it's a simple issue. Thanks!

  • Custom User Avatar

    The instructions are ambigious, and/or the random tests for C are incorrect, as they are testing undefined behaviour by including lowercase text. "choose a text in capital letters including or not digits and non alphabetic characters" could be interpreted as meaning that all input letters will be uppercase, or that we only want to apply the five steps to letters when they are uppercase, but neither is quite true... In order to satisfy the random tests for C, you only want to do the circular shift on letters if they are uppercase, and lowercase letters should not be shifted, but you still have to do everything else to them. The C++ version does not have this problem.

    It should be stated that the circular shift is only to be applied to uppercase letters.

  • Custom User Avatar

    I should have initialized "result" to 0 in the declaration, in case BinaryArray[] is zero-length. Real-world use could might also want some sanity checking that BinaryArray[] elements are really only zero or one.