strcmp | strncmp (read 📌 comment)

Поделиться
HTML-код
  • Опубликовано: 10 дек 2024

Комментарии • 12

  • @onaecO
    @onaecO  Год назад +7

    In my code example i lay down the principles, but i realise that there are some problems with corner cases, sorry for that:
    1) If the strings are NULL, dereferencing them would produce a seg-fault, if NULL == str for both strings would be a nice check
    2) In strncmp, the value of n could be actually anything, even though this would make no sense-> i.e n

    • @onaecO
      @onaecO  Год назад +1

      @@mstarodu Thx Bro for the correction 🫡🙏

  • @villagebox5841
    @villagebox5841 15 дней назад

    thank you sir

  • @Prod.3z
    @Prod.3z Год назад +2

    merci bcp chef tes un bon

    • @onaecO
      @onaecO  Год назад

      Merci a toi!

  • @BILALTARAKI-y1e
    @BILALTARAKI-y1e 5 месяцев назад

    thank you bro;]

  • @حسام-ج5ث4م
    @حسام-ج5ث4م Год назад +3

    you will always be in our hearts as you do in our pools char a []= {109, 121, 32, 114, 101, 103, 97, 114, 100, 115, 32, 102, 114, 111, 109, 32, 109, 111, 114, 114, 111, 99, 111, 32}

    • @onaecO
      @onaecO  Год назад

      🇲🇦🇲🇦🇲🇦🇲🇦🇲🇦🇲🇦🇲🇦🇲🇦
      Sickest comment ever 😜

  • @MrBicholino
    @MrBicholino Год назад

    Very clear! Thanks!!!!

  • @mstarodu
    @mstarodu Год назад +1

    ft_strncmp has a mistake. if n == 0, it should return 0

    • @onaecO
      @onaecO  Год назад

      Friend u right, in my code i don t check for corner cases i.e. (n