C_133 Dynamic Memory Allocation using malloc() | C Language Tutorials

  Рет қаралды 221,980

Jenny's Lectures CS IT

Jenny's Lectures CS IT

Күн бұрын

Пікірлер
@grow_free
@grow_free Жыл бұрын
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.
@NagarajMnaik-bn7lm
@NagarajMnaik-bn7lm Жыл бұрын
Nice bro
@mithileshbhujade1613
@mithileshbhujade1613 Жыл бұрын
Sahi hai !
@Moon_lovee
@Moon_lovee Жыл бұрын
Thanks bhai
@kaushikkumargupta4497
@kaushikkumargupta4497 Жыл бұрын
Exactly 💯
@godzilla4706
@godzilla4706 10 ай бұрын
How bro felt after giving this beautiful example 😃😀
@OmarfarouqMadey
@OmarfarouqMadey Жыл бұрын
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.
@suguflick119
@suguflick119 2 жыл бұрын
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.
@Saumya-bhkt
@Saumya-bhkt 3 ай бұрын
Static Memory Allocation Imagine you're organizing a party and you know exactly how many guests are coming. Let's say 20 people will attend, so you prepare exactly 20 chairs before the party starts. This is "static allocation" because you've reserved a fixed number of chairs (memory) in advance, even if some guests don’t show up. Dynamic Memory Allocation Now, imagine you’re unsure how many guests will attend your party. You prepare only a few chairs initially, and as more guests arrive, you keep adding chairs to accommodate them. This is "dynamic allocation", where you adjust based on the actual need at runtime. In short: - "Static allocation" is like preparing a fixed number of chairs. - "Dynamic allocation" is like adjusting the number of chairs based on how many guests show up.
@bhagyashripatil586
@bhagyashripatil586 2 жыл бұрын
Mam I love ur lecture due to u I can write program and also understand program
@Miserenjamir
@Miserenjamir 2 жыл бұрын
Ma'am I am from northeast! Currently doing my BSC in Cs ! Your videos make programming even more better and easier! ✌️❤️❤️❤️
@yamsumit3076
@yamsumit3076 9 ай бұрын
me also in same course
@AnuragRawat01
@AnuragRawat01 Жыл бұрын
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😅😅
@lokesh6828
@lokesh6828 Жыл бұрын
not that appropriate example according to me
@AnuragRawat01
@AnuragRawat01 Жыл бұрын
@@lokesh6828 sad to know My bad😢😢
@lokesh6828
@lokesh6828 Жыл бұрын
@@AnuragRawat01 I have modified you example, maybe that is more appropriate
@lokesh6828
@lokesh6828 Жыл бұрын
@@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.
@JAYARAMK-l3w
@JAYARAMK-l3w Ай бұрын
Thst is the POWER of JENNY
@pranavrawal9033
@pranavrawal9033 2 жыл бұрын
Perfectly explained everything, an absolute perfection you have in your videos mam.
@tiago.c
@tiago.c Жыл бұрын
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!
@erinsumner1550
@erinsumner1550 8 ай бұрын
Which other one did you watch? (If you don't mind me asking)
@tiago.c
@tiago.c 8 ай бұрын
@@erinsumner1550 Portpholio Courses
@RamakrishnaPrince
@RamakrishnaPrince 2 жыл бұрын
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😘
@johnabednego6728
@johnabednego6728 2 жыл бұрын
Whaooo, cannot stop watching your lecture! Thanks very much ☺
@vanajacreations2.741
@vanajacreations2.741 2 жыл бұрын
The video will be started at 2:29 you can thank me later
@charimuvilla8693
@charimuvilla8693 2 жыл бұрын
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?
@rohank009
@rohank009 Жыл бұрын
Madam please provide video lecture on dynamically allocated structure concept what ever you are teaching is very useful and informative thanks for the concern.
@sanjays7255
@sanjays7255 2 жыл бұрын
Extraordinary teaching ma'am 🔥🔥🔥
@UdaykumarKUday-yd9ut
@UdaykumarKUday-yd9ut 2 жыл бұрын
I didn't understand chapati concept madam, because I don't know hindi. But I understand what you are going to teach.😉😉
@learn_through_building
@learn_through_building 2 жыл бұрын
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😊😊
@merveilleskatumba2886
@merveilleskatumba2886 Жыл бұрын
Thank you , your videos are amazing ....I am loving C
@rahulannarayan
@rahulannarayan 2 жыл бұрын
I like your dynamic chapati allocation example....can relate to it
@ajaykumarharijan9734
@ajaykumarharijan9734 2 жыл бұрын
Mam I liked your teaching way as well as your hair style 🥰
@parisa9374
@parisa9374 2 жыл бұрын
May you please give an example of malloc() for structure as you suggested in this video? Thank you very much!
@crazysoul6987
@crazysoul6987 Жыл бұрын
Amazing Explanation 🍓🌚🙊
@luongManh361
@luongManh361 2 жыл бұрын
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.
@cosminboglis5160
@cosminboglis5160 Жыл бұрын
Thank you very much! Such great videos!
@ambika1.5m78
@ambika1.5m78 2 жыл бұрын
Ma'am plz upload the vedio. That how can we use maloc( ) ,in structure 🙏🙏🙏 It's my heartly request ma'am
@jithendrasabbisetty4027
@jithendrasabbisetty4027 2 жыл бұрын
Yes
@eutychuskurria7765
@eutychuskurria7765 2 жыл бұрын
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
@divyanshbalodhi5642
@divyanshbalodhi5642 2 жыл бұрын
Very good explanation 👍
@Education..29071
@Education..29071 2 жыл бұрын
You are beauty with brain 😊😊😊😊😍
@bipinkadayat
@bipinkadayat 2 жыл бұрын
Thank you so much man🙏🤍 Please Mam make a video Display the names in alphabetical order🤍
@prereloluwa
@prereloluwa 2 жыл бұрын
Thnak you for the explicit exposition You are fantastic. At 22:18 I had some confusions. I thing you spoke your dialect. 👍
@amangupta257
@amangupta257 Жыл бұрын
You can Google it brother
@amarnathsivalingam754
@amarnathsivalingam754 Жыл бұрын
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.
@pavanipyna3797
@pavanipyna3797 2 жыл бұрын
mam please upload a video on malloc function using structure
@jarpalasony6569
@jarpalasony6569 2 жыл бұрын
S mam pls
@sreesanthmoturu81
@sreesanthmoturu81 Жыл бұрын
I am also RGUKT
@sreesanthmoturu81
@sreesanthmoturu81 Жыл бұрын
Hlo
@sreesanthmoturu81
@sreesanthmoturu81 Жыл бұрын
Pavani
@VloggerSudhanau
@VloggerSudhanau 7 ай бұрын
Please mam
@anuj9615
@anuj9615 2 жыл бұрын
I'm die hard fan of you ❤️ Love you from NEPAL 😙
@indianshort1669
@indianshort1669 2 жыл бұрын
Mam your teaching style is as beautiful as you 🙏🙏🙏
@bitsforbits6581
@bitsforbits6581 2 жыл бұрын
even sandeep jain couldnt make me understand dma...but you did it ma'am...
@indianlegendking9071
@indianlegendking9071 11 ай бұрын
Love from Andhra Pradesh 😊😊
@vattianil2159
@vattianil2159 2 жыл бұрын
Amazing teaching 👏 mamm
@priya-we2hg
@priya-we2hg 2 жыл бұрын
Good evening mam🙏🙏🙏💐💞❤
@Prince_D_Coder
@Prince_D_Coder Жыл бұрын
Your videos are really helpful
@Fear098
@Fear098 2 жыл бұрын
I love you ❤️😂 This is my first class
@abhishek5212
@abhishek5212 11 ай бұрын
Thank you so much lovely ma'am ❤😊
@jecodedoncjesuis875
@jecodedoncjesuis875 2 жыл бұрын
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..
@plumSlayer
@plumSlayer 2 жыл бұрын
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....
@Yuvarajbondada
@Yuvarajbondada 2 жыл бұрын
Good explanation Superrr sis...
@sharuk98ala
@sharuk98ala 2 жыл бұрын
You are Gorgeous, One of Gods great creations.♥️
@unknownindian2142
@unknownindian2142 2 жыл бұрын
Frankly speaking I love you mam❤️😅
@Harikesh662
@Harikesh662 Жыл бұрын
Chapati example are very 🐎😅😅good chapati
@haider__khan4567
@haider__khan4567 2 жыл бұрын
I like you, your teaching style.
@allmix608
@allmix608 2 жыл бұрын
Mam u r looking good in this red colour
@balakrishnan1859
@balakrishnan1859 2 жыл бұрын
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
@bhaskarnaik5842
@bhaskarnaik5842 2 жыл бұрын
I became fan of your beauty ❣️
@jayasuriya9285
@jayasuriya9285 2 жыл бұрын
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??
@motivationalblogrameshpaul3005
@motivationalblogrameshpaul3005 2 жыл бұрын
Love teaching 🎈❤️
@akhilmittal3283
@akhilmittal3283 2 жыл бұрын
thanks mam u looking superb mam
@baahbernard4183
@baahbernard4183 Жыл бұрын
You are so good ma'am 🤩
@engr.talhaahmed161
@engr.talhaahmed161 Жыл бұрын
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
@JennyslecturesCSIT
@JennyslecturesCSIT Жыл бұрын
Happy to hear that!
@RiteshKumar-pu3gp
@RiteshKumar-pu3gp Жыл бұрын
@@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
@ck0024
@ck0024 Жыл бұрын
video starts 2:28
@TEJASPLAYZ
@TEJASPLAYZ Жыл бұрын
THANKS 👍👍
@dr.balaraju.j.7868
@dr.balaraju.j.7868 Жыл бұрын
madam great explanation
@zaidumar1174
@zaidumar1174 2 жыл бұрын
Hello, mam can you make a video on matrix chain multiplication, regarding dynamic programming please!! With regards... From me Thank you 😊
@Vincent45678
@Vincent45678 Жыл бұрын
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...
@dhadhiudayreddy3620
@dhadhiudayreddy3620 2 жыл бұрын
Beauty with brain❤️
@527_nikhil2
@527_nikhil2 2 жыл бұрын
Mam ur looking very gorgeous 😍❤️
@saidurgaaravindsurisetti8406
@saidurgaaravindsurisetti8406 2 жыл бұрын
Tq mam for u work for us
@ArjunSingh-wr3jk
@ArjunSingh-wr3jk Жыл бұрын
If we want to creat a pointer normally then we can write int*ptr=&any variable this things int* ptr=variable
@VISHALROCKY13
@VISHALROCKY13 2 күн бұрын
Diff b/w SMA and DMA SMA:memory cannot be reallocated or allocated during the run time of a program2)there is no need to free the memory DMA:memory can be reallocated or allocated during the run time of a program2)there must be use of freealloc function in DMA.
@sureshkalesh2512
@sureshkalesh2512 2 жыл бұрын
Very beautiful😍❤❤❤❤❤✨✨😍😍
@vamsimathi1630
@vamsimathi1630 Жыл бұрын
Nice explanation..
@sanjays7255
@sanjays7255 2 жыл бұрын
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
@CodewithIk1177
@CodewithIk1177 Жыл бұрын
amazing lecture mam
@codewithbishal895
@codewithbishal895 2 жыл бұрын
god level teaching
@farzanaashraf8136
@farzanaashraf8136 2 жыл бұрын
Mam, You are looking very beautiful in this video, Gorgeous☺
@sanjaykumarrana6312
@sanjaykumarrana6312 Жыл бұрын
He Jennie kya lag rahi ho yaar ye red colour ka shout me to gajab lag rahi hai, aapki lecture se jyada mujhe aap pasand ho, i love 💕😘 you
@sambasivagali9966
@sambasivagali9966 2 жыл бұрын
ma'am your lookning gorgeous and your lecture too
@Homelessbillionaire
@Homelessbillionaire 2 жыл бұрын
Success comes from having dreams that are bigger than your fears. Bobby Unser
@TekSandeep
@TekSandeep 2 жыл бұрын
Engineering Teaching madams are good.....
@dharmabhai5728
@dharmabhai5728 2 жыл бұрын
Super timeing edi matram
@Being_Rohan_
@Being_Rohan_ 2 жыл бұрын
i don"t have any relation to programming. once i searched about coding , coding classes, but there i got your video lecture & mam it is being told you that i fell down in love with you & majorly with your voice. so many times i watch your videos only for listening your so adorable voice... Literally din ban jata h mam aapki smile dekh k . What you know that how much pretty your smiley face is....... ❤‍🔥😉..😅.......
@mbadashehada9668
@mbadashehada9668 2 жыл бұрын
simp
@suchind7558
@suchind7558 2 жыл бұрын
Mam op teaching i like ur lecture
@sridharreddy9742
@sridharreddy9742 2 жыл бұрын
great explanation
@tarunpasumarthy
@tarunpasumarthy Ай бұрын
Can we use null pointer instead of void pointers?
@art.isticsoul2024
@art.isticsoul2024 Ай бұрын
At 15.23 I got a doubt ptr stores which variable address?
@StudyAccount-u4t
@StudyAccount-u4t 11 күн бұрын
Ptr stores the base address of dynamically allocated memory.
@sakinasicora2231
@sakinasicora2231 2 жыл бұрын
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 😅
@lokesh6828
@lokesh6828 Жыл бұрын
I have a question Why we didn't declared the malloc function as "void* malloc(size_t size);" 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.
@niranjankumarsingh2096
@niranjankumarsingh2096 Жыл бұрын
12:30
@aswinkumarraj5054
@aswinkumarraj5054 2 жыл бұрын
I have just entered values with Upto n+5 (in for loop, like i
@HarishKumarNamballa
@HarishKumarNamballa Ай бұрын
expain me what is the use of free(ptr) function mam.....
@sujithsenthilraj6798
@sujithsenthilraj6798 Жыл бұрын
In that y we are using int* at first of malloc (time:10:46) y we can't use int alone
@polo4446
@polo4446 Жыл бұрын
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😅
@SUBHADIPSAHOO_07
@SUBHADIPSAHOO_07 2 жыл бұрын
Ma'am ur looking like red rose ❤️🌹❤️🌹
@richtrader9526
@richtrader9526 2 жыл бұрын
Beautiful
@jstar2135
@jstar2135 2 жыл бұрын
Thank You Mam.
@manojm2099
@manojm2099 2 жыл бұрын
But we can achieve the same thing by the below method also right? int n; scanf("%d",&n); int arr[n];
@roshnimandarapu5097
@roshnimandarapu5097 2 жыл бұрын
why should we have to type cast, when generic pointer can take any type of pointer right?
@anandsonar7590
@anandsonar7590 2 жыл бұрын
Thank you mam for this video can you please explain in program of malloc how the pointer returns null please????
@GajulaSaikumar-ju7rl
@GajulaSaikumar-ju7rl Жыл бұрын
Why can't we use Int n; Scanf("%d",&n); Int a[n] It is also working We are giving input at runtime
@itsme-cn8tj
@itsme-cn8tj 2 жыл бұрын
Mis Jenny, I'm not Indian , please at least put the traslate on your video while you using India language or repeat your India santances to english at least, ok. your videos are great Ma'am!
@disciplined469
@disciplined469 2 жыл бұрын
I am feeling proud that you are from out of India and you are learning c with an Indian
@ketankulkarni2286
@ketankulkarni2286 2 жыл бұрын
Good morning madam
@sneha-234
@sneha-234 Ай бұрын
If youve already intialized type of ptr as int than why did you do typecasting later
@harshitpal5558
@harshitpal5558 2 жыл бұрын
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
@msvpraveenpallapothu1720
@msvpraveenpallapothu1720 2 жыл бұрын
Please reply still how many videos are there to complete c programming language
@msvpraveenpallapothu1720
@msvpraveenpallapothu1720 2 жыл бұрын
Please start python tooo please
C_134 Dynamic Memory Allocation using calloc() | C Language Tutorials
13:49
Jenny's Lectures CS IT
Рет қаралды 109 М.
C_132 Introduction to Dynamic Memory Allocation in C  | SMA vs DMA
17:38
Jenny's Lectures CS IT
Рет қаралды 289 М.
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
C_135 Dynamic Memory Allocation using realloc() | C Language Tutorials
18:10
Jenny's Lectures CS IT
Рет қаралды 88 М.
C_138 Enumeration in C | enum data type in C Language
19:34
Jenny's Lectures CS IT
Рет қаралды 96 М.
i wrote my own memory allocator in C to prove a point
5:23
Low Level
Рет қаралды 408 М.
Новый год 2025 на ТНТ "ComedyVision!" @ComedyClubRussia
1:16:27
Pointers and dynamic memory - stack vs heap
17:26
mycodeschool
Рет қаралды 1,5 МЛН
Dynamic memory allocation in C - malloc calloc realloc free
17:35
mycodeschool
Рет қаралды 891 М.
Pointers in C / C++ [Full Course]
3:47:23
freeCodeCamp.org
Рет қаралды 4,8 МЛН
Pointers in C for Absolute Beginners - Full Course
2:04:29
freeCodeCamp.org
Рет қаралды 258 М.
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН