C Programming Tutorial 86 - Intro to Strings and Null Character

Поделиться
HTML-код
  • Опубликовано: 30 сен 2024
  • Start your software dev career - calcur.tech/de... 💯 FREE Courses (100+ hours) - calcur.tech/al...
    🐍 Python Course - calcur.tech/py...
    ✅ Data Structures & Algorithms - calcur.tech/ds...
    ~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~
    ✉️ Newsletter - calcur.tech/ne...
    📸 Instagram - / calebcurry
    🐦 Twitter - / calebcurry
    🔗 LinkedIn - / calebcurry
    ▶️ Subscribe - calcur.tech/sub...
    👨🏻‍🎓 Courses - www.codebreakt...
    ~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~
    ↪ My Amazon Store - www.amazon.com...
    🅿 Patreon - calcur.tech/pat...
    🅖 GitHub Sponsors - github.com/spo...
    Ⓟ Paypal - paypal.me/calcur
    🅑 Bitcoin - 3HnF1SWTzo1dCU7RwFLhgk7SYiVfV37Pbq
    🅔 Eth - 0x350139af84b60d075a3a0379716040b63f6D3853
    📈 Buy Bitcoin - calcur.tech/cr...
    Reserve the Ruby Steel crypto rewards card and get a $25 bonus (use affiliate code "Caleb") - calcur.tech/cr...

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

  • @rvmaglaque9722
    @rvmaglaque9722 5 лет назад +73

    Bro, i know you don't get significant amount of views but you help a lot with someone like me who is starting :)) good job bro i wish all the hard work you put will be re payed :)

  • @marcusokodugha2101
    @marcusokodugha2101 3 года назад +4

    I forgot to putt \0 and now my bank account is empty

  • @juanpedraw4245
    @juanpedraw4245 3 года назад +6

    I want to make a game, and I'm pushing myself to watch your videos to learn. Thank you very much for keeping these lessons free.

  • @xanxusgrim3047
    @xanxusgrim3047 3 года назад +4

    Please put more ads on your vids i'd gladly watch them =) you are a great person

  • @DTWINING
    @DTWINING 4 года назад +6

    Thanks! I needed this while trying to learn something new when social distancing during the virus. Your vids explain things I think a lot of people with programming experience takes for granted.

  • @kyleeames8229
    @kyleeames8229 4 года назад +5

    Almost all modern systems have protected memory so you don't need to worry about a character pointer going and "hacking your bank account". It will however, clobber your programs memory and likely cause your program to crash.

    • @tiagodmota5840
      @tiagodmota5840 3 года назад +1

      Oh, yeah? Protected? So I want to break it, get access to bank accounts and get huge money by reporting issues B-)

    • @hetaeramancer
      @hetaeramancer 3 года назад +1

      It depends on the program silly

  • @PunmasterSTP
    @PunmasterSTP 3 года назад +2

    Null? More like Full...of wonderful information! Thanks again for every single one of these videos Caleb!

  • @dayanitheebalaji7695
    @dayanitheebalaji7695 3 года назад +1

    when we give like char a[10] = "hello" then the compiler inserts null at the end of a string , what if we get the size of string from the user and dynamically allocate memory in the runtime like char * a = (char*)malloc(sizeof(char) * n) here who is assigning null at the end of a string ,,,,, i mean who is doing that job????

  • @yasserj3693
    @yasserj3693 3 года назад +3

    Thank you so much my exam is after few hours I saw most of your viedoes it was very helpful and simple man YOU ARE INCREDIBLE
    keep up

    • @PunmasterSTP
      @PunmasterSTP 3 года назад +1

      How did your exam go?

    • @yasserj3693
      @yasserj3693 3 года назад +1

      @@PunmasterSTP I’ve got D 😭

    • @PunmasterSTP
      @PunmasterSTP 3 года назад

      @@yasserj3693 I'm sorry to hear that! How are the rest of your classes going/how did they go?

  • @laubes7481
    @laubes7481 3 года назад +2

    this guy is awesome keep up the good work Caleb I am learning a lot as a first-year CS student.

  • @_d4r1o_22
    @_d4r1o_22 3 года назад +2

    I like the sarcasm 🤣

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

    actually, there's a difference between NULL and nul. The nul terminator is to indicate the end of a string in C. Not Null...

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

    "If you create a char array with 5 characters, the size will be 6"
    Print it out and stick it to every wall you can find. As a beginner in C, I learned the hard way that strlen() is lying to you.

  • @giorgosntzoganis9184
    @giorgosntzoganis9184 3 года назад +1

    dude, how can i give you my money?

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

    Hey Caleb, just wanted to say I appreciate your effort you put into these videos, you don't understand how much it helps people like us new to the programming scene. Much love wishing you all the best!

    • @tbatana
      @tbatana 11 месяцев назад

      int a=100;
      printf("%d%% agree", a);😎

  • @tomryder4093
    @tomryder4093 4 года назад +2

  • @Msvinodsaini
    @Msvinodsaini 3 года назад +1

    Excellent work....

  • @hannahvaziri5895
    @hannahvaziri5895 4 года назад +2

    do you have any examples of c programming?

    • @PunmasterSTP
      @PunmasterSTP 3 года назад

      What types of examples? If you've watched all of the previous videos in the playlist so far, he's worked through several "example" programs.

  • @shiyammusicmad7667
    @shiyammusicmad7667 4 года назад +2

    WHAT IS THE USE OF THE NULL STRING

  • @londonsystem6622
    @londonsystem6622 3 года назад +1

    The Best

  • @masExz
    @masExz 3 года назад

    omg this actually just solved my problem right now, ty bro!

  • @raniamecheref5690
    @raniamecheref5690 4 года назад +1

    thank uu so muchh brooo

  • @bigfella9745
    @bigfella9745 2 года назад

    Caleb thank you so much for this video perfectly explained this

  • @dineshdina4293
    @dineshdina4293 2 года назад

    Will '0x00' act as a null terminator for character arrays?

  • @jerfersonmatos28
    @jerfersonmatos28 4 года назад +1

    Is it valid on C++?

    • @tiagodmota5840
      @tiagodmota5840 3 года назад +1

      Depende kkkk Tem que ver a sintaxe do C++, é bem diferente em vários aspectos.

  • @zngods
    @zngods 2 года назад

    Im confused i dont get anything like how do i see through these NULL ?

    • @cesarislas7130
      @cesarislas7130 2 года назад

      There are two types of strings:
      array one is like { char str[ ] = {'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd', '\0'} }
      We have also literal string { char str[ ] = "Hello World"; }
      In the direct one we don't have to write the null character, the same thing for loop through strings.
      And you don't see it, The computer will understand it and compile.