C Programming Tutorial - 47 - The Heap

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

I'm at the University and I even don't understeand anything at programming class, but your tutorials are freaking awesome man, keep it flyyying

ramiropinkfloid
Автор

you don't sleep, do you ? 4:49 AM... Well, i only want to say you are awesome Thanks bucky.

sherlockstark
Автор

4:51 AM!!! thank you for really nice tutorials!

Matrixrms
Автор

Woww....I had such a hard time to understand what malloc I can't believe it was such an easy concept! Thanks a lot! you are really changing my view of programming! I really appreciate it!
btw, you always say that you are not a good father or a teacher, but I think you are good!

saras
Автор

These tutorials, WOW, I can seriously learn 100% from these tutorials :O

petarpartaloski
Автор

that chapter is extremely useful but may be you should add the concept "DYNAMIC MEMORY ALLOCATION" to the name of the video perhaps? so that people can find the video and learn it from you directly? your choice of course :):) Thank you!

DoseOver
Автор

Bro men, you're the best. learned so much from you today than i have in 14 weeks from my Comp sci professor

Seyi-Anjorin
Автор

You deserve a standing ovation for this

PostMeridianLyf
Автор

Do not cast the result of malloc in C:

amitagnani
Автор

but doesn't that mean that now you need to know the amount of intergers required? and if so dont you still have the same problem you had at the beginning ? how many intergers -> how much memory?

tikytak
Автор

why are you using int instead of uint? these values never go negative. there are no negative addresses in the register.

SenorQuichotte
Автор

i donot get the problem here to use heap her e in my code i ask the user the size of my array and it accept it and by the way i assume in original c will allote data in the free space memory so what really important about the heap ???
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
int x, i;
scanf("%d", &x);
int y[x];
for (i=0;i<x;++i)
{
y[i]=rand()%x+1;
printf("%d\n", y[i]);
}

return 0;
}

mohamedmohsen-rcjf
Автор

Pro tip: ctrl + shift + esc
Happy uninterrupted recording!

KwithH
Автор

Can u guys explain what does (int *) in the 8th line for??

cotkhumno
Автор

he is a great programmer and teacher, he would be cooler if he used the bloodshed compiler :-)

danielanderson
Автор

I'm pretty sure each process has its own heap

aandrese
Автор

So this isn't programming related, but does anyone know how to get those memory gauge and such he has on the top right?

mikebarbosa
Автор

sizeof is a keyword, not a function. You can drop the parenthesis.

makodad
Автор

why not just int *points = malloc(sizeof(int)*5); ?

SteepVisions
Автор

what happen if an exception is thrown before the free()? Will the dynamically allocated memory still be freed? Or...exception/error that closes the program is not available in C?

kongyihfann
welcome to shbcf.ru