C Programming Tutorial 86 - Intro to Strings and Null Character

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 พ.ย. 2024

ความคิดเห็น • 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 :)

  • @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.

  • @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.

  • @faheemahmed25025
    @faheemahmed25025 2 ปีที่แล้ว +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 ปีที่แล้ว

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

  • @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.

  • @PunmasterSTP
    @PunmasterSTP 3 ปีที่แล้ว +2

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

  • @xanxusgrim3047
    @xanxusgrim3047 3 ปีที่แล้ว +4

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

  • @kyleeames8229
    @kyleeames8229 5 ปีที่แล้ว +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 4 ปีที่แล้ว +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

  • @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?

  • @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.

  • @masExz
    @masExz 3 ปีที่แล้ว

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

  • @marcusokodugha2101
    @marcusokodugha2101 3 ปีที่แล้ว +3

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

  • @_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...

  • @Msvinodsaini
    @Msvinodsaini 3 ปีที่แล้ว +1

    Excellent work....

  • @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????

  • @bigfella9745
    @bigfella9745 2 ปีที่แล้ว

    Caleb thank you so much for this video perfectly explained this

  • @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

  • @dineshdina4293
    @dineshdina4293 2 ปีที่แล้ว

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

  • @jerfersonmatos28
    @jerfersonmatos28 4 ปีที่แล้ว +1

    Is it valid on C++?

    • @tiagodmota5840
      @tiagodmota5840 4 ปีที่แล้ว +1

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

  • @raniamecheref5690
    @raniamecheref5690 4 ปีที่แล้ว +1

    thank uu so muchh brooo

  • @giorgosntzoganis9184
    @giorgosntzoganis9184 3 ปีที่แล้ว +1

    dude, how can i give you my money?

  • @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.

  • @londonsystem6622
    @londonsystem6622 4 ปีที่แล้ว +1

    The Best

  • @tomryder4093
    @tomryder4093 4 ปีที่แล้ว +2