Introduction to Pointers | C Programming Tutorial

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

ความคิดเห็น • 154

  • @dimitrijedjokic3387
    @dimitrijedjokic3387 ปีที่แล้ว +79

    I studied computer science in high school, and we were learning about pointers a bit, but I never really got hang of what they represent, now I'm at faculty, again learning about pointers and this video helped me more than 5 hours of my class, really glad I stumbled across you, great video, great explanation.

    • @PortfolioCourses
      @PortfolioCourses  ปีที่แล้ว +8

      Thank you very much for the kind feedback Dimitrije! I'm really glad to hear that this video helped you out, and that you enjoyed the explanation. Pointers are super tricky I think, many people tell me they find them to be the hardest part of understanding C. 🙂

  • @Blank271
    @Blank271 ปีที่แล้ว +14

    Thanks so much for these tutorials, it's rare to find someone who is so clear and so well organized, doesn't waste any time and also has such a huge output of free material. Thanks.

    • @PortfolioCourses
      @PortfolioCourses  ปีที่แล้ว

      You're very welcome, thank you for sharing this positive feedback, I'm really glad that you enjoy the material! :-)

  • @TheHset
    @TheHset ปีที่แล้ว +11

    I'm so glad they had us *take a basic computer science course prior to our C course. I think why most people find pointers confusing is because they don't know how computer memory works.

    • @PortfolioCourses
      @PortfolioCourses  ปีที่แล้ว

      That's very true, it's very difficult to understand lower level programming languages like C without some idea as to how computers are working at the hardware level (at least, the big picture anyways). :-)

  • @PhilemonEyramOcloo
    @PhilemonEyramOcloo 10 หลายเดือนก่อน +5

    simplest and best explanation on pointers I've found thus far....You're a life saver

    • @PortfolioCourses
      @PortfolioCourses  10 หลายเดือนก่อน

      I'm really glad you enjoyed it! :-)

  • @tathagataghosh1609
    @tathagataghosh1609 7 หลายเดือนก่อน +2

    Hi sir, I am from India, There are many indian youtube channels teaching C programming , though I found your channel most helpful. Thanks for uploading this kind of detailed videos.

  • @davidrbuni
    @davidrbuni 2 หลายเดือนก่อน +1

    Your videos are absolutely perfect! Clear, to the point, easy to understand explanations, tons of examples, sweet voice, clean workspace, man I just wish I had found your channel sooner.

    • @PortfolioCourses
      @PortfolioCourses  2 หลายเดือนก่อน +1

      I’m glad you’re enjoying the videos, thank you for the kind feedback! :-)

  • @wlcrutch
    @wlcrutch ปีที่แล้ว +11

    Dude…your videos are on point. Having just finished an intense course in C++ at my university but being actually more interested in C, this is a great way to both recap similar concepts that exist in both languages as well as getting started in C

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

      That’s awesome, thank you for the positive feedback, I’m really glad to hear the videos are helping you recap concepts and get started with C! :-)

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

    Just wow ,.. I've just started learning c, but your tutorials are just exceptional in comparison to what i've been watching.. it just amazes me how your channel is underrated..

    • @PortfolioCourses
      @PortfolioCourses  ปีที่แล้ว

      I'm really glad that you're enjoying the content!!! :-) And thank you very much for the kind feedback, that is really motivating for me to hear that.

  • @tokuumeiii8792
    @tokuumeiii8792 7 หลายเดือนก่อน +2

    this explanation is a real life saving , thank you for your effort 😊😊

  • @rouisaek
    @rouisaek 23 วันที่ผ่านมา

    Very useful tutorial about pointers specially the `malloc` example for creating array size in the runtime

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

    I am taking C programming class, and your videos are so helpful. thank you for sharing such great content.

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

      You’re very welcome! :-) Thanks for sharing this feedback, I’m really glad to hear the videos are helping you out!

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

    THANK YOU!! You are one of VERY FEW who understood how to use the SCREEN AREA properly for a screen presentation. Nice layout, easy to read font size. DOUBLE THANKS TO YOU ! :) Next... i dont know how many videos and articles about pointers in C i have seen and read...i still had trouble grasping it, since i could not align "a data type" with a plain "memory address", since these things do have nothing to do with each other to my understanding. BUT now i can see why/when the "type" starts to become useful in conjunction with a plain memory-address pointed to.

    • @PortfolioCourses
      @PortfolioCourses  ปีที่แล้ว

      You’re very welcome Axel, I’m glad you enjoyed the presentation style and that the video was able to help you learn about pointers! :-)

  • @lambdadotjoburg
    @lambdadotjoburg 2 หลายเดือนก่อน +1

    I think it's worth noting that the pointer-variable swap technique would come in handy if the structures being swapped are larger than long int data type

  • @nyeowsz
    @nyeowsz 10 หลายเดือนก่อน +1

    This video is very great. Can't believe I understood pointers and some memory related lessons. Thank you so much.

  • @mumbaiverve2307
    @mumbaiverve2307 6 หลายเดือนก่อน

    Possibly the best set of videos on C. Please consider doing an episode on assert() .

  • @meridiasbeacon7669
    @meridiasbeacon7669 ปีที่แล้ว

    Incredibly helpful, I was having trouble wrapping my head about how these work but this video cleared it all up.

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

      Awesome, I'm happy the video was able to help you out! :-)

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

    This video is what i was looking for ! , Thank you sir i really learnt a lot watching this , much love from egypt

    • @PortfolioCourses
      @PortfolioCourses  ปีที่แล้ว

      You’re very welcome! :-) I’m so glad to hear you learned a lot watching it, much love back at you from Canada!

  • @ipadeolabamidele
    @ipadeolabamidele ปีที่แล้ว

    The best video ever! It has put an end to all my curiosities and given clarifications to all confusions! Thank you thank you thank you thank you sir! The examples you gave really shed enough light! God bless you hugely sir❤❤❤🙏🙏🙏🙏

  • @user-kv4gj9jp4h
    @user-kv4gj9jp4h ปีที่แล้ว

    This really helped me understand pointers when other resources didn’t thank you so much

    • @PortfolioCourses
      @PortfolioCourses  ปีที่แล้ว

      You’re very welcome, I’m so glad to hear this video helped you to understand pointers! :-)

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

    Better than paid Udemy course. As clear as day!

  • @idomark1238
    @idomark1238 ปีที่แล้ว

    I am passing the first semester in my school thanks to u...thanks for the free content, its very helpfull, keep i up :)

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

      You're welcome Ido! :-) And thank you very much for sharing that positive feedback with me. A big part of the reason why I love making these videos is that they might be able to help students like you, so that means a lot to me that the videos are helping you out!

  • @lawniczakjohn
    @lawniczakjohn ปีที่แล้ว

    Came back to brush up, love this video!

  • @lovromilinovic2835
    @lovromilinovic2835 ปีที่แล้ว

    Great explanation, helped me a lot. I'll be watching more of your videos for sure. Cheers!

    • @PortfolioCourses
      @PortfolioCourses  ปีที่แล้ว

      That's awesome, I'm glad it helped you Lovro! :-)

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

    This certainly helps in my understanding of pointers. I think one of the reasons that pointers have flummoxed me over the years is the notation: Using an asterisk to signal both a pointer and the mathematical operation for multiplication is confusing.

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

      I agree the notation for pointers is confusing. 🙂 I also don't like how the * operator is used to both declare a pointer and as the dereference operator. I'm not even sure I like the name "pointers", I've found people seem to understand them better when they're called "memory addresses".

    • @Mnogojazyk
      @Mnogojazyk 2 ปีที่แล้ว +1

      @@PortfolioCourses, I guess I’ll call them memory addresses and regard pointer as a nickname. :-)

    • @PortfolioCourses
      @PortfolioCourses  2 ปีที่แล้ว +1

      @@Mnogojazyk Hahaha 🙂

  • @stana1980
    @stana1980 8 หลายเดือนก่อน

    Thanks for the explanation really helped me understanding the concept
    Thanks

  • @HahahaGamingz
    @HahahaGamingz ปีที่แล้ว

    You sir earned my respect. I watched alot of your content already. Can`t offer more than a sub , but all my thanks !

    • @PortfolioCourses
      @PortfolioCourses  ปีที่แล้ว

      Thank you so much for watching the videos and subscribing Kyoshi! :-) Another thing you could do to help the channel if you like is sharing the channel with others (classmates, friends, social media, etc).

  • @holipop
    @holipop 7 หลายเดือนก่อน

    this video changed my life

  • @seanl8930
    @seanl8930 ปีที่แล้ว

    Your video's are so amazing. I am studying for a test and some of the examples from my class are in here and you explained them to me just like my professor did, or better. Thank you for making such amazing help when you need it at a moments notice.

    • @PortfolioCourses
      @PortfolioCourses  ปีที่แล้ว

      You're welcome Sean, I'm very glad to hear these videos are helping you out! :-)

  • @samisiddiqi5411
    @samisiddiqi5411 ปีที่แล้ว

    Your video was my "AHA moment" for pointers and malloc lol.

    • @PortfolioCourses
      @PortfolioCourses  ปีที่แล้ว

      Awesome I'm glad to hear that Sami, congratulations on the 'aha moment'! :-)

  • @neviswarren
    @neviswarren 5 หลายเดือนก่อน

    Thank you. This is very helpful.

    • @PortfolioCourses
      @PortfolioCourses  4 หลายเดือนก่อน +1

      You’re very welcome, I’m glad it was helpful for you! :-)

  • @ABDELMUNIEMOMARSULIMANAHMEDTEE
    @ABDELMUNIEMOMARSULIMANAHMEDTEE ปีที่แล้ว

    man, your are the best, these video rescue me.

    • @PortfolioCourses
      @PortfolioCourses  ปีที่แล้ว

      I’m really glad you’re enjoying the videos Abdelmuniem, thank you for sharing this kind feedback! :-)

  • @JH-ux1re
    @JH-ux1re 2 ปีที่แล้ว +3

    You’re the best for sure!

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

    thank you for the class!

  • @ابوأحمد-ث9ت4ض
    @ابوأحمد-ث9ت4ض ปีที่แล้ว

    Man I bought c course, your course 20x better

  • @chillbro2275
    @chillbro2275 2 หลายเดือนก่อน

    Thank you. I like the use of pointers for dynamically allocating memory. I still don’t get why one would have a function change the value of a variable that is not brought into scope for that function.

    • @PortfolioCourses
      @PortfolioCourses  2 หลายเดือนก่อน

      Sometimes we have things like data structures that persist across a series of function calls, and what the functions work with is a pointer to that data structure in order to access it. So for an example: th-cam.com/video/YjxKYxpf51E/w-d-xo.html. It would typically be something that's pretty important to the program, to have that same state be accessed by multiple functions.

  • @Zraeicro
    @Zraeicro 6 หลายเดือนก่อน

    I'm glad youtube existed

  • @timg.6460
    @timg.6460 ปีที่แล้ว

    Thank you so much!

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

    Thank you so much for this video! Could you explain what -> has to do with pointers? Is it a different way to express the star * operator?

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

      You're welcome Sidney! :-) And -> is called the arrow operator, it's for working with pointers to structs, and in some sense it is a bit like the * operator yes, it's covered in this video here: th-cam.com/video/w5XM1N7hLgc/w-d-xo.html

    • @sidneyrobinson5719
      @sidneyrobinson5719 ปีที่แล้ว

      @@PortfolioCourses This helps thank you!

  • @quitecontrary.
    @quitecontrary. 6 หลายเดือนก่อน

    THANK YOUUUUU

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

    Subscribed!
    🏆

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

    Very nicely explained

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

      Thank you very much for the kind feedback. :-)

  • @jonathanmoore5619
    @jonathanmoore5619 ปีที่แล้ว

    So this is a deep copy, if not a pointer and shallow copy if a pointer within a struct? What about string literals? I guess that doesn't matter because they are immutable? Is that right?

    • @PortfolioCourses
      @PortfolioCourses  ปีที่แล้ว

      If you have a pointer in a struct, then when you do an assignment, yes a "shallow copy" will occur as it's really only the pointer that will be copied from one struct to the next. And string literals are immutable, yes. :-)

  • @alfredocandia6178
    @alfredocandia6178 หลายเดือนก่อน

    Magnificent

  • @tornikechachanidze2245
    @tornikechachanidze2245 2 ปีที่แล้ว +1

    Thanks for great explanation! I know generally its not good practice but in this swap example if we save adress of x and y in "int a" and "int b" instead of "int *a" and "int *b" does this make any change?

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

      You're welcome Tornike! :-) The parameters of the swap function do need to be int *a and int *b (i.e. pointers) for the swap to work, it won't work if they are just int a and int b, as those would int parameters and not pointers.

  • @cleightthejw2202
    @cleightthejw2202 ปีที่แล้ว

    About that issue of freeing memory after assigning it with 'Malloc (and also calloc, correct?)'-
    Is that memory space freed by the system after the program is closed? And it definitely would be removed after a reboot or crash of the system?
    Thank you

  • @rad6626
    @rad6626 ปีที่แล้ว

    you make amazing videos

    • @PortfolioCourses
      @PortfolioCourses  ปีที่แล้ว

      I'm really glad to hear you enjoy them, thank you for the positive feedback! :-)

  • @Chigo-nr8jg
    @Chigo-nr8jg ปีที่แล้ว

    i'm a bit confused, towards the ending, a is a pointer, then a is also an array?

    • @PortfolioCourses
      @PortfolioCourses  ปีที่แล้ว

      Which time of the video is this? Arrays decay to pointers when used in certain ways, and pointers can be used with "array notation". This video about passing arrays to functions addresses some of this: th-cam.com/video/oe2bZKjiWrg/w-d-xo.html. As does this video on pointer notation: th-cam.com/video/hWGYBMO553A/w-d-xo.html. :-)

  • @Andrii87
    @Andrii87 7 หลายเดือนก่อน

    good video, i like it

  • @itsame2649
    @itsame2649 ปีที่แล้ว

    for the example at time 14:18, how does *a and *b know to reference the memory address of x and y? I thought we would first have to define that *a points to x and that *b points to y.

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

      It's because when we call swap we have: swap(&x, &y);
      That will set a to point to x and b point to y. :-)

  • @bahioTeixeira
    @bahioTeixeira ปีที่แล้ว

    I have no problem understanding the concept of things, i found it really hard to develop any creative solution for problems tho, how can i improve that?

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

      Great question Victor! :-) What you're talking about is a very common problem for computer programmers. I've created this playlist to try to start speaking to this problem: th-cam.com/play/PLA1FTfKBAEX6e_cFeqZCuUcexEJZS4OOQ.html. But the playlist is still new and I have to make more videos on that one. Essentially though, it takes time and lots and lots of practice to get better at "creating solutions". Every time we solve a problem or figure out a new program our brain adds another "solution" to a library inside our heads. When we face new problems, we look back at this "library" for help. The new problem might not be identical to old problems, but it shares common characteristics to old problems. The more problems we see and learn about the more common characteristics there will be to 'new' problems, and the easier they get to solve. There is more to it then this... we get better at debugging with experience too, for example. But this is a big part of it, just lots of experience and practice. :-)

  • @alexandarpetrov
    @alexandarpetrov 9 หลายเดือนก่อน

    Top !!!

  • @rezuwankabir3372
    @rezuwankabir3372 ปีที่แล้ว

    js curious so wanted to ask you how long do u think c language takes to learn (like completely and ur good at it)

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

      That's a good question Rezuwan, but it would depend on a lot of things. Like if it's the first language that someone is ever learning it will take longer than if they know other languages already. Or if they are learning it full-time vs part-time, etc. I would say C can be learned "well enough" to work in it by taking a 4 month course at a university or college, or by self-studying full-time for a month. And I would say it would take a year of really working with it on some projects to get really "good" at it, though with programming, learning never stops. :-)

  • @victor_noda
    @victor_noda ปีที่แล้ว

    I've just noticed, you're the guy from 3Blue1Brown !!!

    • @PortfolioCourses
      @PortfolioCourses  ปีที่แล้ว

      I've never heard of that channel before Victor, but I looked it up just now and it looks cool! :-)

  • @justcurious1940
    @justcurious1940 ปีที่แล้ว

    thank u portfolio u are so cool

  • @edward3105
    @edward3105 2 ปีที่แล้ว +1

    on this line int *a=&b; it stores the value that's on b address and not the b address right?

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

      That will store memory address of the variable b into the pointer variable a.

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

      @@PortfolioCourses but you placed * before a you didn't say a=&b;

    • @PortfolioCourses
      @PortfolioCourses  2 ปีที่แล้ว +1

      @@edward3105 So if we had:
      int *a = &b;
      this would be equivalent to this:
      int *a;
      a = &b;
      I think this part of C is kind of confusing, but if we're declaring a pointer and initializing it to a memory address on the same line, then we have the * in front of the pointer variable name. And that's just because we need it there to declare it the variable as a pointer.
      But after we've declared a pointer, whenever we use the * with our pointer variable it works as the de-reference operator that "gets what the pointer is pointing to".

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

      @@PortfolioCourses I kinda thought about that but in this situation like you showed in other video char *s2 =" abcdef" why I don't declare the pointer like this char *s2= &a and let's say char a[ ]= {"abcdef"}

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

      @@edward3105 Oh so in if we have:
      char a[] = "abcdef";
      Then a is char array that has been initialized to the string "abcdef". So..
      a[0] = 'a'
      a[1] = 'b'
      ..
      a[5] = 'f'
      a[6] = '\0'
      And then if we want to make s2 a pointer to a in this case we would say:
      char *s2 = a;
      The reason is that arrays are different than variables.
      If we had:
      char x = 'm';
      THEN we would have:
      char *s2 = &x;
      and s2 would be a pointer to the x, it would store the memory address of x. But in the case of:
      char a[] = "abdef";
      'a' is a char array, and when we just use the name of a char array like 'a' what we actually get is a memory address, there is no need to use the & operator.
      So if we have:
      char *s2 = a;
      then we would actually get s2 storing the memory address of the array 'a' (the memory address of the first char in that array) We say that the array 'decays to a pointer' in this situation. If you try this:
      char a[] = "abcdef";
      printf("%p", a);
      you'll see what I mean, in that 'a' is just a memory address. So we don't need to apply the & operator to *get* the memory address like we do a variable.

  • @TheBluNitro
    @TheBluNitro 4 หลายเดือนก่อน

    so all values in that array is stored in that one memory address?

    • @PortfolioCourses
      @PortfolioCourses  4 หลายเดือนก่อน +1

      They *begin* at that one memory address, the memory address is the memory address of the first element in the array. :-)

    • @TheBluNitro
      @TheBluNitro 4 หลายเดือนก่อน

      @@PortfolioCourses oh I see, I understand now. thanks fam ^^

  • @krishnakumawat9957
    @krishnakumawat9957 ปีที่แล้ว

    thanks helpful vid

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

    I have a question. My teacher usually writes for example word = (char *) (malloc(10*sizeof(char))
    what is the (char *) for ?

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

      malloc returns a void pointer, and in C++ it is necessary to "cast the type" (change the type) to (char *) or whatever other type of pointer your variable is... in C this isn't necessary. This answer has more details: stackoverflow.com/a/605856. And this answers explains some reasons why I don't do it: stackoverflow.com/a/605858. Maybe next class you can tell your teacher they don't need to do that. ;-)

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

      @@PortfolioCourses thank you!

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

      @@raquelbraunschweig2938 you're welcome! :-D

  • @addmix
    @addmix ปีที่แล้ว

    I think the only reason pointers are confusing is because the syntax makes little sense. There's nothing about the syntax that gives clues as to what the code does, unless you already know about pointers and their syntax.

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

      I think the usage of * to both declare a pointer and de-reference can be confusing. I also think the syntax:
      int *p;
      is confusing because the type 'int' isn't really the type that p stores. Really, p stores a memory address, and int is the type of data that p is pointing TO, i.e. the type of data at the memory address that p is itself storing. But for regular variables, 'int' would be the type. That different can be confusing too I think. Imagine if instead we had:
      address p{int};
      Or something like that to indicate p stores a memory address of type int. To me that, or something like it, could help. Oh well, it is what it is now! :-)

  • @nomalware2811
    @nomalware2811 ปีที่แล้ว

    Man u r littttttttt !!!!!!!!!!!

    • @PortfolioCourses
      @PortfolioCourses  ปีที่แล้ว

      hahaha I've never been called lit before, so thank you! :-)

  • @KrisKasprzak
    @KrisKasprzak ปีที่แล้ว

    I would highly recommend to start off with why you need a pointer in the first place. The way it’s presented sounds like it’s just a bunch of busywork.

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

      Thanks for the feedback Kris, I hear you. I get into this about 9:30 into the video. Normally I like to start with "why" too but in the case of pointers, 1) most people that find this video are students that are confused from trying to learn pointers from their teachers and that are looking to understand the "nuts and bolts" of what is happening, 2) it's hard to explain the use cases without explaining memory addresses and at that point I might as well explain pointers anyways. 🙂

  • @raidon5553
    @raidon5553 ปีที่แล้ว

    which compiler do you use for c

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

    thanks!

  • @marilynyballa809
    @marilynyballa809 ปีที่แล้ว

    god bless ur heart

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

    I love you!

  • @NikitaSafronov-y6i
    @NikitaSafronov-y6i 2 ปีที่แล้ว +1

    AAAaaaaawesome ! =)

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

    For once, the software is actually really useful

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

      I'm glad you found this useful Karan! :-)

  • @timog7358
    @timog7358 ปีที่แล้ว

    haha the meme is too accurate

  • @Soso.Tataema
    @Soso.Tataema ปีที่แล้ว

    I want an Apple but I point to Banana tree...

    • @PortfolioCourses
      @PortfolioCourses  ปีที่แล้ว

      Ah the joys of manual memory management! :-)

  • @johnd942
    @johnd942 4 วันที่ผ่านมา

    Sorry.
    I made it half way through before I became 'bamboozled!'
    😕😕

  • @Reverso...
    @Reverso... ปีที่แล้ว

    O indiano KAKAKAKAKAKAKA

  • @alst4817
    @alst4817 หลายเดือนก่อน

    A bit pointless…

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

    Many many thanks for your content. I'm a beginner with c and listen to these when driving (not distracted of course). I try to write code from books and other sources of basic code. My strategy is to loop, loop and loop again through c content and knowing it will sink in. I'm a bit stuck on functions ATM. Have seen your functions video and am still a bit confused with functions. A question I'm attempting is to write a c program that asks for two number (printf), stores them in variables (scanf) then prints the result (printf again). I understand what a prototype is and return type, function name and arguments of the function (variables) as I understand it. I'm not following any academic course ATM and am learning because I'm interested. Many thanks again.

  • @laputa4825
    @laputa4825 ปีที่แล้ว

    Is there a video on dynamic length for strings and scanf?
    Such as if I wanted the user to enter a string that isn't restricted to 5, 7, 8, 20 characters?
    Also is there a video on input validation?
    How would I prevent the code from continuing on with unwanted inputs that are combinations of characters and numbers and special characters.

    • @PortfolioCourses
      @PortfolioCourses  ปีที่แล้ว

      This video covers string input with spaces: th-cam.com/video/f8589Y9LHHg/w-d-xo.html. This video covers validating that a string contains an integer: th-cam.com/video/W3dtyZr8rcY/w-d-xo.html. But that's more for fun, if you really want to do validation I would suggest checking out regex: www.scaler.com/topics/c-regex/

  • @nhatan2511
    @nhatan2511 ปีที่แล้ว

    Thank you very much

  • @matjasunio6354
    @matjasunio6354 10 หลายเดือนก่อน

    thank you so much!