Ad
  • Custom User Avatar
  • Custom User Avatar

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

  • Custom User Avatar

    {
    char source[] = "altERnaTIng cAsE";
    cr_assert(strcmp(to_alternating_case(source), "ALTerNAtiNG CaSe") == 0);
    cr_assert(strcmp(to_alternating_case(source), "altERnaTIng cAsE") == 0);
    cr_assert(strcmp(to_alternating_case(source), "ALTerNAtiNG CaSe") == 0);
    cr_assert(strcmp(to_alternating_case(source), "altERnaTIng cAsE") == 0);
    }

    We can't pass the above test function in C since we aren't directly modifying source, right? Can someone help me shed some light on this?