• Sign Up
    Time to claim your honor
  • Training
  • Practice
    Complete challenging Kata to earn honor and ranks. Re-train to hone technique
  • Freestyle Sparring
    Take turns remixing and refactoring others code through Kumite
  • Community
  • Leaderboards
    Achieve honor and move up the global leaderboards
  • Chat
    Join our Discord server and chat with your fellow code warriors
  • Discussions
    View our Github Discussions board to discuss general Codewars topics
  • About
  • Docs
    Learn about all of the different aspects of Codewars
  • Blog
    Read the latest news from Codewars and the community
  • Log In
  • Sign Up
dansaki Avatar
Name:Daniel Saki
Clan:Unknown
Member Since:Jun 2021
Last Seen:Mar 2023
Profiles:
Following:1
Followers:1
Allies:1
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations
  • Replies (8)
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • Madjosz
    • commented on "Fix string case" c solution
    • 7 months ago

    It puts the null terminator at the end of both strings.

  • Custom User Avatar
    • e404
    • commented on "Complementary DNA" kata
    • 4 years ago

    Dear Dansaki,

    I ve noticed that you store result into static char variable complement;

    I would try t store it into char * ptr_complement.

    Otherwise you could breach some data in the memory space denoted for static variables

  • Custom User Avatar
    • kgashok
    • commented on "dansaki's C solution for "Counting Duplicates"" kumite
    • 4 years ago

    Glad you found it useful!

    Psssst! Give this exercise a shot - you will enjoy it.

    Happy coding!

  • Custom User Avatar
    • kgashok
    • commented on "Counting Duplicates" kata
    • 4 years ago

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

  • Custom User Avatar
    • kgashok
    • commented on "Counting Duplicates" kata
    • 4 years ago

    I transferred your code to ideone.com and tested it for "abcdea" as the input.
    It returns 0 as the value, while the correct solution must return 1 (because 'a' is a duplicate).

    Please see https://ideone.com/C9s7JM

    After you have fixed your logic, then bring it to codewars. In codewars, you don't need to define a main function.
    Good luck,

  • Custom User Avatar
    • akar-0
    • commented on "Counting Duplicates" kata
    • 4 years ago

    Hi. Please use markdown tags to format your code or it is very discomfortable to read, see: how-to-format-code-in-markdown.

    Moreover it's hard to help you if you don't give more elements of the problems you face: what fails? Do you have some error log, are the results different from what is expected?

  • Custom User Avatar
    • hobovsky
    • commented on "Complementary DNA" kata
    • 4 years ago

    This line: complement[strlen(dna)+1] += '\0'; is not a proper way to set a null string terminator.

  • Custom User Avatar
    • hobovsky
    • commented on "Complementary DNA" kata
    • 4 years ago

    Please read this: https://docs.codewars.com/training/troubleshooting#post-discourse

  • © 2025 Codewars
  • About
  • API
  • Blog
  • Privacy
  • Terms
  • Code of Conduct
  • Contact

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...