Design Principles with Pointer Parameters and Functions

Поділитися
Вставка
  • Опубліковано 19 жов 2024

КОМЕНТАРІ • 12

  • @grimvian
    @grimvian Рік тому +1

    Again a very, very vell produced "Learning C video". I'm using heap on a dayli basis and tought I knew how to, and yet again you showed, how to use the heap with inplicit casting!
    From a pegogical view you did a deeper video and pointed out the pros and cons in a very good pace. Your students must be happy with you.
    Also not using music and no annoying video editing is superb.
    In my country a 3 days C course at high level, cost about 2600 dollars...

  • @adambishop328
    @adambishop328 2 роки тому +1

    Great Video! Before, I was having a difficult time using pointers as parameters and understanding the const vs. not const distinction. Was hoping there was another video about freeing and ownership, but hopefully it's in the works

  • @arampee
    @arampee 2 роки тому +1

    Great Video

  • @kambizkambiz2339
    @kambizkambiz2339 3 роки тому +3

    Great Video! Question is I couldn't find the next video you mention at 37:00 for calling a function before releasing the memory allocated by malloc().

  • @kalakarun
    @kalakarun 3 роки тому +1

    Very useful video. Thanks

  • @yanshixiong434
    @yanshixiong434 3 роки тому

    great video~ !

  • @t.p.2305
    @t.p.2305 Рік тому

    Super!

  • @Vibratebalance
    @Vibratebalance 2 роки тому

    Thank you.

  • @ibrahimtayyem9260
    @ibrahimtayyem9260 3 роки тому

    Thanks alot!

  • @Rai_Te
    @Rai_Te 9 місяців тому

    At 5:51 there is a misconception. ... The called function Point_print() did NOT change the pointer it was given ...
    instead, it changed data the given pointer pointed to.
    Yes I know, this is what you meant ... but it is not what you said.
    It is important for the viewer to understand, that in C arguments are passed 'by value' (with the exception of arrays) ...
    so a function you call gets a copy and if it makes changes to the parameter, only the copy is changed.
    So, in this case, the function gets a pointervalue copied to its stack and made available to it in the variable
    you called 'self' ... a change to this variable (like self++) would not change anything in the caller. but since this
    variable is a pointer (and is therefore pointing to something, something that has not been copied), this pointer
    can be used to change the data the pointer points to ... and this is now visible to the caller.

  • @63montywilliams50
    @63montywilliams50 3 роки тому

    would have been cool if you included the header file and point function

  • @creepr524
    @creepr524 2 роки тому +2

    Still waiting for next video