Structure Padding in C

preview_player
Показать описание
C Programming: Structure Padding in C Programming.
Topics discussed:
1) Memory allocation to Structures.
2) Need for Structure Padding.
3) The concept of Structure Padding.

Music:
Axol x Alex Skrindo - You [NCS Release]

#CProgrammingByNeso #CProgramming #StructuresInC #StructurePadding #Structure&Union
Рекомендации по теме
Комментарии
Автор

speachless!! you are soooo goood in explainging. thanks a lot

ahamd
Автор

your style of pedagogy has helped me in overcoming phobia of coding.
the sort of knowledge you are imparting is enriching our lives.
thanx a ton & we look forward to having more such amazing content.
kudos to you.

John-slzz
Автор

This was the best. Saw many tutorials, but understood the concept here in one go. I rarely comment on videos, but really had to appreciate you here. Thanks man!

devugoel
Автор

Brilliant! I particularly liked the repetition when driving home a particularly important point. Superb work (and exactly what I was looking for - was searching for a good detailed explanation on structure storage in memory).

WistrelChianti
Автор

Thank you very much! I understood it. I Love the format you chose for the video, a black background, a representation of the memory bytes and everything was explained in a very direct and simple way.

andresvallelisboa
Автор

Perfect video to understand the importance of padding and its uses.

anshhmehta
Автор

trying to read how this works is way harder than having pictures and someone explaining. Thank you.

michaelhernandez
Автор

Sir it is a good class for me. Thank you sir, upto now I didn't no the background allocation of memory now I got clarified. SIR ONE MORE THING, I WANT TO sll, dll, cll, sporting techniques tree's, graphs, bss. Pls... upload sir, one of ur student, thank you sir.

sunilkumarreddy
Автор

Explained very detailed, Cleared every doubt.
Thank you

manoharbompella
Автор

when declaring a char and then a double variable it should give 4+8=12 as output. But it shows 16. Can someone explain why?

RahulRazj
Автор

You are explaining 💯 times better than my college

sujitsatpute
Автор

Padding is not defined in the C (or C++) standard. This behavior depends on the compiler. It can also be configured too. For example, VC++ has the /Zp and #pragma pack options while GCC has -fpack-struct option.

dono
Автор

Missing to explain __attribute__((packed)) with unaligned memory access which is possible (with ARM).

ArjanvanVught
Автор

Awesome work 👏
Lesson: we should be careful while arranging the srruct variables for better memory utilisation

andistheinforitbutso
Автор

If we use one int, one double and again one int variable then the size of variable should be 16 but it is 24 why???

vipulchawla
Автор

It is a good habit to put first the biggest type in ascending order to help compilator !

manuelconte
Автор

I m having 8 yrs of experience. Noone Clarified the doubt lk u..thank you..expecting more content from you

beeyou
Автор

Considering the processor is of 32-bit
Void main ()
{ char a;
}
then in the memory for the variable a, only 1 byte will be allocated, then how the processor will request this memory using word...without padding?

umairalvi
Автор

Why is the compiler not allowed to rearrange member variables? If there's a consistent rule for this, then even external libraries will not face any ambiguity. That way, int variable could've been placed in front, and no wastage will be required and all 3 can be accessed in one CPU cycle.

VivekYadav-dsoz
Автор

Such an amazing explanation! You made it so simple to understand, thank you :)

TechnoVisionTV