Ad
  • Default User Avatar

    it's a matter of memory management. first thing: printf your output before your return statement to see what you're actually returning. this will give you a start on what you need to fix

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    In C,

    Either the test crashes or I also get this error:

    The expression strcmp(result, "hello hello hello ") == 0 is false.

    And when I run it else where it is not return false.

    I'm using malloc - is that the problem?

    Cheers,