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!
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.
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.
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...
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
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.
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).
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
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. 🙏
nice voice command that attracts the audience to stay focused ....
thats his real voice i think
True
Agree
True
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!
you channel is a gem .
I can't thank you enough neso for these amazing lectures..🧡🙏🧡
Neso is the best Dear ❤
I was searching for this type of explanation.
This tutorial made me totally clear about the concept.
Thank you.
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.
You are a life saver. Thanks neso academy ❤❤
superb voice, intonation, explanation. Altogether superb video. 👌🙏
Phenomenal video and the tone of voice actually helps understand which part is very important to understand. 👍🏼
the way he teaches concepts is excellent and thankyou for such good presentation
Great work!
Excellent pedagogy and teaching style!!!
Gratitude...
Best channel for CS students.
i really appreciate your calm and intelligence while explaining thanks a lot
Straight to the point, it doesn't get any better than this! Thank youuu bro
Thank you very much! I have a hard time understanding this in our lectures. But you make it so easy to understand.
rothschild CLAN FR FR?????!!!
Probably the best explanation !!!
Good job sir !
Your explanation is awesome 🧡
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.
your way of telling and describing is amzaing NASO..
#very helpfull video thx a lot
On the point and crisp thank you for this video!
god-tier tutorial. you are a hero
Still watching your videos since my first year of uni. Now in my final semester. Thank you sir!
Thanks sir
I am able to understand each and every concept very clearly..
Hats off to you sir
Thank you.,the best part is you came with a example...keep going ❤️❤️
Crystal clear. Thank you. ☺️
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...
Thank you so much for your detailed and clear explanation. It was very helpful and understandable.
Sir I love the way you teach, after watching your video, there is no room for doubts.
I appreciate you guys SO MUCH
you are great. god bless you
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
Thank You Sir For All The Lectures C lang, and Data Structure ❤❤
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.
Best channel 💯💯💯 for Programming..... ❤️❤️
excellent video sir
Explained so clearly.. Thank you very much!
Without u i really can't understand c programming thanks for the lecture
Finally understood what it is after a long search
Much needed explanation! Thank youuuu
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.
You are a C god!
Thank you so much. You explained it really well.
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.
Excellent!
Wow What an Explanation @NesoAcademy........
Keep making these videos to help STUDETNS!!
Thank you for clearing my concept.
Thanks alot.
Good quality video. Nice voice for narrating man!
very nice explanation
So preety good channel having point to point presentations, dulcet and clear voice and nice content!!! ;)
Sirr you are absolutely stunning ✨✨..
Thanks for the explanation
i know its HARD but please Complete DS videos ASAP ! i'm just relying on you for my DS. THANK YOU.
oh wow !! thank you so much. 😍i didnt understand anything my teacher taught but this video cleared all the concepts..
this was all i needed in a dma lecture
no.1 place to learn C....NESO Academy
As simple as that
love you man
I was waiting for this.
I've finally understood!!!!
Very clear explanation. Thank you :)
very carefully explained. thank you.
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).
Salute your hardworking😍😍😍🥰
Great Explanation!!! Thanks...
Superb LECTURES with amazing way of delivering concepts. :)
Thank you so much sir
explain ..very excellent
Superb! in one word
if (ptr == NULL){
printf("memory not available:");
exit(1);
}: this block is causing error ; once i remove it everything is perfect
help :)
Too good explanation
Thank you for explaining this so clearly :)
thank you so much! really appreciate your effort!
very helpful
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.
it's just a good practice
Thank you so much for your video!!!
thanks bro!
Thanks a lot , concept made easy
You are the best!
Tqs a Lott🙂🙂 my teacher💞 u r my teacher whether u not in front of me but I learning from u teacher
malloc allocates a single large block of memory where calloc allocates sequential blocks of memory
Thanks very useful..
Thnx bhai
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
what is the name of your compiler??please suggest me one for c programming??
Thankyou so much sir
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. 🙏
Great explanation, Thanks a lot bro
Just precise!
I there any lecture notes or handout for that awesome lecture ?
Thank you sir
❤Easily understandable
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
Thankyou sir❤
Ultimately superb 👌👌
this video really helped a lot
Thank you
and here we got the neso
I want to give 1000 likes for this video.
thanks
A very informative video too much 😇😇😇