Strings Under The Hood

Поділитися
Вставка
  • Опубліковано 2 лют 2025

КОМЕНТАРІ • 18

  • @stupidgeek
    @stupidgeek  7 місяців тому +2

    Shoutout to Beej, I'm using his book "Beej's Guide to C programming" for learning C, parts of the video are referenced from the book. (This is not a promotion)

  • @AlbatrossCommando
    @AlbatrossCommando 6 місяців тому +2

    *That's how they work in C most other languages actually have a more complex string data structure and usually prepend the size of the string before the actual data.

  • @Subspace.T.Tripmine
    @Subspace.T.Tripmine 6 місяців тому +2

    Strings in C: Yay! Only one string type! Strings in rust: &str String OsStr noises

    • @stupidgeek
      @stupidgeek  6 місяців тому +1

      ⚠️⚠️⚠️

  • @Jaber_Dev
    @Jaber_Dev 5 місяців тому

    بسبب هذا المفهوم انصح اي شخص جديد تعلم البرمجه ان يبدا بتعلم الاساسيات بلغه منخفضه المستوى مثل سي بلس بلس حتى يفهم هذه المصطلحات والمفاهيم الاساسيه بكيفيه عمل لغه البرمجه والحاسوب محتواك مذهل لقد شاهدت كل فيديوهات استمر متابعك من الاردن 🇯🇴

  •  7 місяців тому +2

    The \0 character is not a C thing, and it is used in C for more than string termination. It can be used for null terminated arrays instead of having to pass in the size of the array.

    •  7 місяців тому +2

      Matter of fact, not all strings in C are null terminated

    • @stupidgeek
      @stupidgeek  7 місяців тому +1

      I see, thankyou for sharing 😄

    • @stupidgeek
      @stupidgeek  7 місяців тому

      oh, I will read about that, thankyou for sharing :)

    •  7 місяців тому

      @@stupidgeek The GNOME APIs (GTK, GLib, Adwaita, GObject, etc etc) are a good example of all cause they have multiple signatures for different types of requirements, and some strings you have to free yourself and others the library frees for you, you can find a lot of different C peculiarities there

  • @eamonburns9597
    @eamonburns9597 7 місяців тому +1

    1:59 that is a backslash 🤓

  • @teddythecat0
    @teddythecat0 7 місяців тому +2

    Thought it was bytes lmao

  • @MALIK-NOUMAN-u3y
    @MALIK-NOUMAN-u3y 7 місяців тому +1

    Do more work