Dynamic Memory Allocation using malloc()

Поделиться
HTML-код
  • Опубликовано: 3 ноя 2024

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

  • @prabhudinesh
    @prabhudinesh 4 года назад +282

    nice voice command that attracts the audience to stay focused ....

  • @idellius7505
    @idellius7505 Год назад +20

    I love that Neso often briefly revisits older topics as they become relevant to the current one in the video. Thank you so much for that extra effort in your lectures. It really helps tie all the material together to solidify a complete understanding. Great job!

  • @whatandwhy5862
    @whatandwhy5862 4 года назад +35

    you channel is a gem .

  • @itsritika3561
    @itsritika3561 4 года назад +99

    I can't thank you enough neso for these amazing lectures..🧡🙏🧡

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

      Neso is the best Dear ❤

  • @kawsar.130
    @kawsar.130 3 года назад +20

    I was searching for this type of explanation.
    This tutorial made me totally clear about the concept.
    Thank you.

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

    Thanks for the video, it's very well explained! I'd just add something important which is always remember to free the memory one we have used the variable and we won't do anything else with it. This is done with the 'free(variable)' function.
    Why, you'd ask? Malloc won't do it for us, it's not automatic like in happens in the static memory. So if we don't free the memory, it'll stay active indeterminately. This is called a 'memory leak' and if we're not careful it can accumulate or sometimes even filling all the memory available, leading to OS bugs or crashing the program.
    So again, that's why it's a good practice to always free the memory once we've used it.

  • @7Strigiformes
    @7Strigiformes 4 года назад +15

    You are a life saver. Thanks neso academy ❤❤

  • @tula__
    @tula__ 5 месяцев назад +2

    superb voice, intonation, explanation. Altogether superb video. 👌🙏

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

    Phenomenal video and the tone of voice actually helps understand which part is very important to understand. 👍🏼

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

    the way he teaches concepts is excellent and thankyou for such good presentation

  • @tejaschaudhari1969
    @tejaschaudhari1969 6 месяцев назад +1

    Great work!
    Excellent pedagogy and teaching style!!!
    Gratitude...

  • @zahidhasan7052
    @zahidhasan7052 2 года назад +2

    Best channel for CS students.

  • @adameral3853
    @adameral3853 6 месяцев назад

    i really appreciate your calm and intelligence while explaining thanks a lot

  • @Raphamerlo
    @Raphamerlo 2 месяца назад

    Straight to the point, it doesn't get any better than this! Thank youuu bro

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

    Thank you very much! I have a hard time understanding this in our lectures. But you make it so easy to understand.

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

    Probably the best explanation !!!
    Good job sir !

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

    Your explanation is awesome 🧡

  • @1997-aic
    @1997-aic Год назад

    What a fabulous explanation, based on that 4 pages of A4 size, i wrote down it completely, Now i understood what is malloc and how it work internally. Thank you sir for sharing this valuable information, this is help me a lot.

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

    your way of telling and describing is amzaing NASO..
    #very helpfull video thx a lot

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

    On the point and crisp thank you for this video!

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

    god-tier tutorial. you are a hero

  • @Theodore2303
    @Theodore2303 9 месяцев назад

    Still watching your videos since my first year of uni. Now in my final semester. Thank you sir!

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

    Thanks sir
    I am able to understand each and every concept very clearly..
    Hats off to you sir

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

    Thank you.,the best part is you came with a example...keep going ❤️❤️

  • @arjundas7078
    @arjundas7078 11 месяцев назад +1

    Crystal clear. Thank you. ☺️

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

    I think u are getting so much of love and happiness from ur beautiful work....I heartfully thanking you....u are really best teacher and u propogating ur knowledge to ur own mother earth family... thank you sir...I am happy with ur work...

  • @divyasrivastava6424
    @divyasrivastava6424 4 года назад +10

    Thank you so much for your detailed and clear explanation. It was very helpful and understandable.

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

    Sir I love the way you teach, after watching your video, there is no room for doubts.

  • @v8wr
    @v8wr 18 дней назад

    I appreciate you guys SO MUCH

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

    you are great. god bless you

  • @Forpc-h9d
    @Forpc-h9d Год назад

    my english is not so good but the way you are teaching its really amazingg i didn't even understand the concept of malloc on other channels which are in hindi

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

    Thank You Sir For All The Lectures C lang, and Data Structure ❤❤

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

    no, thank YOU Mr. Neso for making this simple and easy-to-understand video. After you explained it, it was obvious really. ok. Love you. bye bye now.

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

    Best channel 💯💯💯 for Programming..... ❤️❤️

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

    excellent video sir

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

    Explained so clearly.. Thank you very much!

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

    Without u i really can't understand c programming thanks for the lecture

  • @SaiyanPrince-xy6sz
    @SaiyanPrince-xy6sz 2 месяца назад

    Finally understood what it is after a long search

  • @tassneemaltaf2001
    @tassneemaltaf2001 8 месяцев назад

    Much needed explanation! Thank youuuu

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

    brother, firstly thanks for everything you make.
    second i want to do some tasks on C language, so where can i find tasks and solve it.

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

    You are a C god!

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

    Thank you so much. You explained it really well.

  • @devonscoles5705
    @devonscoles5705 2 года назад +11

    You don't need to cast before malloc.
    It is unnecessary, as void * is automatically and safely promoted to any other pointer type in this case.
    It adds clutter to the code, casts are not very easy to read (especially if the pointer type is long).
    It makes you repeat yourself, which is generally bad.
    It can hide an error if you forgot to include . This can cause crashes (or, worse, not cause a crash until way later in some totally different part of the code). Consider what happens if pointers and integers are differently sized; then you're hiding a warning by casting and might lose bits of your returned address. Note: as of C99 implicit functions are gone from C, and this point is no longer relevant since there's no automatic assumption that undeclared functions return int.

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

    Excellent!

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

    Wow What an Explanation @NesoAcademy........

  • @yourlinuxguy
    @yourlinuxguy 2 года назад +1

    Keep making these videos to help STUDETNS!!

  • @collegeWale.insane
    @collegeWale.insane 2 года назад

    Thank you for clearing my concept.
    Thanks alot.

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

    Good quality video. Nice voice for narrating man!

  • @-micchaya-
    @-micchaya- Месяц назад

    very nice explanation

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

    So preety good channel having point to point presentations, dulcet and clear voice and nice content!!! ;)

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

    Sirr you are absolutely stunning ✨✨..

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

    Thanks for the explanation

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

    i know its HARD but please Complete DS videos ASAP ! i'm just relying on you for my DS. THANK YOU.

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

    oh wow !! thank you so much. 😍i didnt understand anything my teacher taught but this video cleared all the concepts..

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

    this was all i needed in a dma lecture

  • @sayandeepsoren361
    @sayandeepsoren361 7 месяцев назад

    no.1 place to learn C....NESO Academy

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

    As simple as that
    love you man

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

    I was waiting for this.

  • @diandongatamaku3210
    @diandongatamaku3210 4 месяца назад +1

    I've finally understood!!!!

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

    Very clear explanation. Thank you :)

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

    very carefully explained. thank you.

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

    In last for loop you have write *(ptr+i) and this display the value (which was wrote by you before from keyboard). Please tell me what display &*(ptr+i).

  • @48_prasenjitmondal6
    @48_prasenjitmondal6 4 года назад +2

    Salute your hardworking😍😍😍🥰

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

    Great Explanation!!! Thanks...

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

    Superb LECTURES with amazing way of delivering concepts. :)

  • @SNEHAMADDINENI-b1n
    @SNEHAMADDINENI-b1n 3 дня назад

    Thank you so much sir

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

    explain ..very excellent

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

    Superb! in one word

  • @bullymaguire2335
    @bullymaguire2335 2 года назад +2

    if (ptr == NULL){
    printf("memory not available:");
    exit(1);
    }: this block is causing error ; once i remove it everything is perfect
    help :)

  • @akritiyadav3873
    @akritiyadav3873 5 месяцев назад

    Too good explanation

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

    Thank you for explaining this so clearly :)

  • @YM-uj3zl
    @YM-uj3zl Год назад

    thank you so much! really appreciate your effort!

  • @r.g.tutorials1846
    @r.g.tutorials1846 4 года назад +1

    very helpful

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

    No need to cast the return value of malloc in C! If your compiler warns or errors on you, you are probably using a C++ compiler, not a C compiler.

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

    Thank you so much for your video!!!

  • @e.a7424
    @e.a7424 2 года назад +1

    thanks bro!

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

    Thanks a lot , concept made easy

  • @abhijitbarman4401
    @abhijitbarman4401 8 месяцев назад

    You are the best!

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

    Tqs a Lott🙂🙂 my teacher💞 u r my teacher whether u not in front of me but I learning from u teacher

  • @royankit126
    @royankit126 4 года назад

    malloc allocates a single large block of memory where calloc allocates sequential blocks of memory

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

    Thanks very useful..

  • @KrishnaMahajan1207
    @KrishnaMahajan1207 3 месяца назад

    Thnx bhai

  • @redrose5950
    @redrose5950 4 года назад

    Is it like we are creating first block of memory using malloc() and then using pointer we will accessing the next memory location for storing the 2, 3... Variable values in those locations? Is it the concept which is explained in this program? Please explain Sir

  • @rahulRawat-lb7ku
    @rahulRawat-lb7ku 3 года назад +1

    what is the name of your compiler??please suggest me one for c programming??

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

    Thankyou so much sir

  • @TechByte8
    @TechByte8 9 месяцев назад

    This small program contains so many complex concept to understand this program completely.
    You need to understand how
    Address arithmetic for
    p+1
    You need to understand how *(p+1) is working.
    This program requires understanding of pointers in great detail.
    Thanks for the video. 🙏

  • @abdishakur2489
    @abdishakur2489 4 года назад

    Great explanation, Thanks a lot bro

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

    Just precise!

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

    I there any lecture notes or handout for that awesome lecture ?

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

    Thank you sir

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

    ❤Easily understandable

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

    thank you for your lecture. but shouldn't the program contain free(ptr) at the end? the memory is allocated at heap, but is not freed after

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

    Thankyou sir❤

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

    Ultimately superb 👌👌

  • @saijahnavi5447
    @saijahnavi5447 4 года назад

    this video really helped a lot

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

    Thank you

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

    and here we got the neso

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

    I want to give 1000 likes for this video.

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

    thanks

  • @kunalsoni7681
    @kunalsoni7681 4 года назад

    A very informative video too much 😇😇😇