C_133 Dynamic Memory Allocation using malloc() | C Language Tutorials
ฝัง
- เผยแพร่เมื่อ 19 มิ.ย. 2024
- C complete playlist: • Programming in C
Use my code jkl10 to get 10% off on GATE subscription
GATE Subscription- unacademy.com/goal/gate-ese/P...
Evolve for GATE 2023 (CS & IT) - Batch unacademy.com/batch/evolve-fo...
Spark for GATE 2023 (CS & IT) - Batch D (English)- unacademy.com/batch/spark-for...
Ascend for GATE 2024 (CS & IT) - Batch G- unacademy.com/batch/ascend-fo...
Connect & Contact Me:
Vlogging Channel Link: bit.ly/354n7C7
Facebook: / jennys-lectures-csit-n...
Quora: www.quora.com/profile/Jayanti...
Instagram: / jayantikhatrilamba
Twitter: / khatrijenny
See Complete Playlists:
Placement Series: • Placements Series
Data Structures and Algorithms: https: • Data Structures and Al...
Design and Analysis of Algorithms(DAA): • Design and Analysis of...
Dynamic Programming: • Dynamic Programming
Operating Systems: // • Operating Systems
DBMS: • DBMS (Database Managem...
#Cprogrammingtutorials
#DynamicMemoryAllocationinC
#mallocfunctioninC
#Jennyslectures
In static memory allocation you have a glass full of water and in dynamic memory allocation you have an empty glass and a jug and you can take as per your need.
Nice bro
Sahi hai !
Thanks bhai
Exactly 💯
How bro felt after giving this beautiful example 😃😀
1. Static Memory Allocation (Toy Shelves):
Imagine you own a toy store, and you have a fixed set of shelves with five slots. Each slot can hold a different toy. You decide in advance which toys will go into each slot. Once the toys are placed, you cannot change the shelves' structure, and the toys in those slots are fixed. This is similar to static memory allocation.
2. Dynamic Memory Allocation (Toy Store with Adjustable Shelves):
Now, imagine you own a toy store, but this time you have the ability to add or remove shelves as needed. You start with an empty store and add shelves to accommodate toys as customers come in. If a customer leaves, you can remove the shelf to free up space. This represents dynamic memory allocation.
Ma'am I am from northeast! Currently doing my BSC in Cs ! Your videos make programming even more better and easier! ✌️❤️❤️❤️
me also in same course
Ma'am, your ways of explaining concepts are too good, I learnt C and C++ at least 2 decades ago. Wish we had someone like you to teach us, would have aced it for sure.
Thank you so much for your support.
Hi Jenny love your videos! I would be very interested in a video that further explains how this magic box called malloc works behind the scenes. How does it find memory to give you? How expensive is it to call it and what are some good practices? Does memory fragmentation affect it at all?
Perfectly explained everything, an absolute perfection you have in your videos mam.
Mam I love ur lecture due to u I can write program and also understand program
reacently watched "c" videos way of teaching excellant lot of knowledge is their in your videos ☺, as early as possible can you start java.thank you mam,yours loving student😘
Whaooo, cannot stop watching your lecture! Thanks very much ☺
Thank you very much! Such great videos!
I'm watching another C course besides Jenny, both are amazing, but everytime I get confused there I come here and find the information missing that I was asking for in the other course. Anyway, no course is able to cover every aspect of a subject, so they are complementary, and Jenny is always great on explaning, thank you so much!
Which other one did you watch? (If you don't mind me asking)
@@erinsumner1550 Portpholio Courses
Real life example:-
Static memory allocation:- having wallet so that we can pay currency notes whenever we need , for that we need to keep as much money inside wallet as expected no matter it'll be used or not.
Dynamic memory allocation :- rather than having a wallet to pay money, we can keep Google pay or Paytm on our mobile so that we can pay money as per the need there will be no tention to keep currency notes
Hope u guys can relate with it😅😅
not that appropriate example according to me
@@lokesh6828 sad to know
My bad😢😢
@@AnuragRawat01 I have modified you example, maybe that is more appropriate
@@AnuragRawat01
The real life example can be
Static memory allocation : Having Rs 10000 from which you can purchase anything but you cannot resell it.
dynamic memory allocation: having Rs 100000 from which you can rent anything around you and when to return the rented item, you will get full refund and you can use it again and again.
Thank you , your videos are amazing ....I am loving C
Though your English is a bit hard to listen to, I get familiar with it while turning on the caption. Actually, I'm learning another paid course, but I must watch your lessons because they're very easy to understand, they're helping me to figure out what is really under the hood.
Madam please provide video lecture on dynamically allocated structure concept
what ever you are teaching is very useful and informative thanks for the concern.
Extraordinary teaching ma'am 🔥🔥🔥
Ma'am plz upload the vedio. That how can we use maloc( ) ,in structure 🙏🙏🙏
It's my heartly request ma'am
Yes
May you please give an example of malloc() for structure as you suggested in this video? Thank you very much!
Thank u mam for doing vedios on c it helping a lot i recommend so many students on my college and you make it c as easy😊😊
Huge fun and a follower you have a mentor in c language i just get trouble in understanding your language when you shift from English to ..... leaving me hanging . But you are be best
I didn't understand chapati concept madam, because I don't know hindi. But I understand what you are going to teach.😉😉
even sandeep jain couldnt make me understand dma...but you did it ma'am...
I like your dynamic chapati allocation example....can relate to it
Your videos are really helpful
Hello, mam can you make a video on matrix chain multiplication, regarding dynamic programming please!!
With regards... From me
Thank you 😊
It feels very lovely when i listen uh speaking hindi🥰🥰🥰
I like you, your teaching style.
mam please upload a video on malloc function using structure
S mam pls
I am also RGUKT
Hlo
Pavani
Please mam
Very good explanation 👍
Mam your teaching style is as beautiful as you 🙏🙏🙏
Tq mam for u work for us
You are Gorgeous, One of Gods great creations.♥️
Thank you so much man🙏🤍
Please Mam make a video
Display the names in alphabetical order🤍
If we want to creat a pointer normally then we can write int*ptr=&any variable this things int* ptr=variable
Love teaching 🎈❤️
Mam I liked your teaching way as well as your hair style 🥰
Just a genuine question, do you take personal tutions of students, I do understand your course, but sometimes I've got program questions which are difficult to understand 😅
Thank you so much lovely ma'am ❤😊
Beautiful
Mam here I have a doubt,we can also reduce the memory waste using"" variable length array concept ""mam.then why we want to use malloc for reduce memory waste
great explanation
Amazing Explanation 🍓🌚🙊
Thank you mam for this video
can you please explain in program of malloc how the pointer returns null
please????
You are so good ma'am 🤩
Good explanation
Superrr sis...
Nice explanation..
I'm die hard fan of you ❤️
Love you from NEPAL 😙
Thank You Mam.
THANKS 👍👍
Amazing teaching 👏 mamm
Mam after allocating 8 bytes if we need more memory like we need to expand that existing memory block then how we can do that
amazing lecture mam
god level teaching
You are beauty with brain 😊😊😊😊😍
I became fan of your beauty ❣️
I have just entered values with Upto n+5 (in for loop, like i
Thnak you for the explicit exposition
You are fantastic.
At 22:18 I had some confusions. I thing you spoke your dialect. 👍
You can Google it brother
she was explaning the logic of Dynamic memory allocation and its importance of a their food Chappathi.
if you request your friend to bring you chappathi delivered @ your home since you are not sure how much hunger you are in, your friend might possiblly bring more number of chappathi (for eg:) 5 but you may eat just 2 or 3 and rest is a waste which is a example of Static memory.
Where as if you go to a canteen or a restraunt and get the food according to your need and there is no wastage which is the example of Dynamic memory.
why should we have to type cast, when generic pointer can take any type of pointer right?
a[n] , where 'n' is the number of integer data that user wanted to add. Now no memory is wasted right??. Is it now static??
Mam op teaching i like ur lecture
i always want to learn about dma concept but dint understand before much , love the way she teaches and it clear all my memory concepts, thank you so much for the video, keep up the good work ma'am
Happy to hear that!
@@JennyslecturesCSIT mam I want to learn c++ language and I covered till DMA so will it be easy to learn or it is entirely different
madam great explanation
Please Mam, as soon as you speak your language, we lose your explanations.
Your explanations are so valuable that we don't want to miss a word of what you say.
Remember that people follow you all over the world; United States, Europe, Africa..
I'm really sorry for the inconvenience, a temporary soluiion could be, pls mention the time over here and ig someone kind enough could explain the part spoken in Hindi Language....
thanks mam u looking superb mam
In that y we are using int* at first of malloc (time:10:46) y we can't use int alone
mam please can you explain about pratt algorithms please
Mam u r looking good in this red colour
Love from Andhra Pradesh 😊😊
pls can you also do a video on big O notation
But we can achieve the same thing by the below method also right?
int n;
scanf("%d",&n);
int arr[n];
I love you ❤️😂
This is my first class
Beauty with brain❤️
Thanks mam
Very beautiful😍❤❤❤❤❤✨✨😍😍
Good evening mam🙏🙏🙏💐💞❤
Success comes from having dreams that are bigger than your fears.
Bobby Unser
Mam, are you conducting Python & Django course. Please let me know. Thanks
After free(ptr) when I printing the values the values are being printed, But after free(ptr) the values should not be printed na... Why Is this happening May I know where did I did the mistake...
Super timeing edi matram
Frankly speaking I love you mam❤️😅
Thnku jii
Hi mam, i am confusing with (ptr+i) can you explain this?
Mam can you upload a video for malloc using structure
You are so beautiful ❤️❤️❤️
I forget everything every time when I look at you watching you videos of lectures...
Your Name ? please ....
Static memory : Live cricket match (we can't watch the match before or after)
Dynamic memory:We will watch the match Highlights whenever you want
Which one is better
p is pointer and i is in loop
Scanf(“%d”,&p[i])
Or
Scanf(“%d”,(p+i))
I think the 1st one....its more comfortable... Bt is it correct in this case?
Engineering Teaching madams are good.....
Mam but pointer variable is used to store only address but why are you using point er variable to store DMA
Mam did you done videos on jawa
The video will be started at 2:29 you can thank me later
Please reply still how many videos are there to complete c programming language
Please start python tooo please
How is array and structure different?
Why can't we use
Int n;
Scanf("%d",&n);
Int a[n]
It is also working
We are giving input at runtime
maam ..please post priority queue...algorithm also😭😭😭
Mam please do live lectures
ma'am your lookning gorgeous and your lecture too
ma'am can you some question related to thi topic please
Why didn't you use the void pointer mam ?
Mam ur looking very gorgeous 😍❤️
In "programming in c" playlist, this is the first video with 1080p quality. But of no use because ma'am looks prettier even in 144p quality😅