If there is no Jenny's lectures I definitely quit from CS DEPARTMENT BUT NOW I can't quit from this because I ❤️ MY CS DEPT BECAUSE OF JENNY MAM MY BEST CODING GURU TQ SO MUCH MAM
don't focus your attention on the negative comments mam, coz it's just a distraction. Most of your fan base love your work and are grateful for you to do this here.
Teaching everything you have for free is really appreciable. Can you please make a video on your coding journey and how you got into youtube . Thank you again 😄.
Mam, you are a blessing to us, your lectures helped me in my exam, and i got A+ in C programming. It is not about the grade, but the understanding, you are making me understand C, and this is good for me as a beginner. Thanks mam.
*WHY IT WILL NOT TAKE 2 CYCLES?* - in the total 8 bytes of memory stack, if total 5 bytes are required for 2 variables (1 int + 1 char) then to process 5 bytes from any location, 2 times the memory has to be accessed if the system can access only 4 bytes at one time. So how does it make sense to use 1 bytes first and 4 bytes at last of the memory stack?
Mam after structure packing pls cover enum, malloc, calloc, realloc ! Don't forget to cover these topics mam pls 🥺😕 You have also replied on my comment "Okie" so pls don't forget to cover these topics mam please pls 🙏😄
instead of increasing decreasing will more reduce size e.g - int a,char b then 4 byte will take at 0 to 3 and char will place at 4 so total will be 5 where in increasing it is 6
Hi Ma"am. Hope you will be doing Great.I am your biggest fan. I love the way you speak, the way you deliver the Lectures. We understand it Very Very.... Well. keep doing it . Thanx
hello mam, Thankyou for give answer of what is padding beacause of this question asked in my interview and unfortunately i don't know then after i search on youtube/google and after this i found this video
One thing is missing, to reduce memory wastage one should always use packing rather than writing elements in increasing order of their size. CPU cycles does not matter.
Please answer, #include Struct abc{ Int a; Char b; Int c; }var; Void main() { Printf("%d bytes", sizeof(var)); } Output : 12 bytes Whereas i am expecting the output to be "16 bytes" [4bytes(for a)+1bytes(for b)+3bytes(padding)+4bytes(for c)+4bytes(padding)] coz my system is of 64bit and word size has to be of 8bytes.
I defined int,char,int in 64 byte computer. I expected sizeof this struct 16 byte but it was 12 byte. 4(int) + 1(char) + 3(blank) + 4(int) = 12byte. Why is it like this ? Shouldn't take also 4 byte ?
I have also been asking the question but it is mostly ignored. What I found out from research is that compiler sometimes perform additional optimizations or the compiler settings may be affecting the structure behaviour, Compiler behavior can vary, so it's worth checking the documentation or specific compiler settings to understand the exact behavior in your case Often the structure will be aligned to the size of the largest member in the struct, so because the strict has int the max size of a member is 4 bytes and the struct is 4-bye aligned as a result. 🙂 this was the situation in my case, I confirmed this by iincluding a long datatype and the size became 24 meaning the compiler made the byte-alignment according to the largest member of the struct, if not I should have gotten 20 instead for a 4-byte alignment,
how padding reduce cpu cycle or increase speed as it will take 2 cycle for int and char , without padding it was taking 2 cycle so how it increase speed.
yeah, I think she made a mistake because in both instances it would still take 2 cycles for a 4-byte word addressing, but at the end of the day I guess she explained the concept well and explained it properly when she used three members at 12:35 (char, int, char) for the structure
@@monarchofaether actually she is right , i learnt after that many resources actually, if we only want to use either char or int without padding then cpu will process 1 cycle for 2 byte another cycle for remaining 2 byte int which is stored in anothee 8 byte address, but if you use padding then all byte of either int or char will be on one 8 byte address storage so if you only need to access int then it will run 1 cpu cycle. you can understand it as for accessing only one variable data type it is faster other wise we have to run unnecessary cycle
Thank you mam, but there is one correction... Don't blame you,just want to help people.. There is little different theory...for padding Let's take example: struct { double , char} as per this logic on 64 bit machine, answer will be 8+1+3(padding)=12. But Padding happens of the highest data type, like in our case highest is 8 byte, so next it reads as same byte(if there is less it will pad), so 8 + 1+7(padding) If there are more variables then too it will keep padding to make it 8byte... I don't blame Jenny but looks she missed something,btw she is doing the great job.
Please do try {Double , int} {Int , char} {*p , char} {Long double, char} You will observe the results... I am not here to criticize anyone.. I started learning from Jenny mam,n I respect her.
#Q Thank you for info. After structure padding may I know the process of data reading happen correct way.colud you please explain the process of read in unaligned and aligned structure?
ma'am at 12:35 using the same datatype in structure members is an error said by you in previous videos...Kindly clarify my doubt why you have written the same data type. Thank you.
Structure s { Char *ptr; Char c; }; Size of structure in 32bit compiler it's giving size as 16, Why not size is 12( 8 for pointer, 4 for char), it's word size is 4 right, so why not multiple of 4 size is not there
There is little different theory...bro, I got to know today... Padding happens of the highest data type, like in your case highest is 8 byte, so next it reads as same byte, so 8 + 1+7(padding) I don't blame Jenny but looks she missed something,btw she is doing the great job.
Ma'am, Theory Of Automata py bhi Series baneaya Ga.Ma na boht search kia tha lekin boht moshkil . agar aap koi youtube channel ya notes etc share kardein.barii mehrobani hogi....thank you
struct abc { char a; char b; }var; For 32 bit processor (4 bytes word size) sizeof(var) should be 4 bytes but, I am getting result 2 bytes on my laptop after running this program. If someone can answer, then please answer this.
sizeof() is the memory in bytes used from the allocated allocated is the separated memory for that paticular struct. so ig it's showing you the memory used by the struct abc
mam . when will start oops concepts , it is very important for us , please tell me mam , I am waiting your reply , please please mam , I humbly request to you.
If there is no Jenny's lectures I definitely quit from CS DEPARTMENT BUT NOW I can't quit from this because I ❤️ MY CS DEPT BECAUSE OF JENNY MAM MY BEST CODING GURU TQ SO MUCH MAM
Wah anna waah..🎉
don't focus your attention on the negative comments mam, coz it's just a distraction. Most of your fan base love your work and are grateful for you to do this here.
Teaching everything you have for free is really appreciable. Can you please make a video on your coding journey and how you got into youtube . Thank you again 😄.
Mam, you are a blessing to us, your lectures helped me in my exam, and i got A+ in C programming. It is not about the grade, but the understanding, you are making me understand C, and this is good for me as a beginner. Thanks mam.
Awesome It just clear the concept
amazing ma'am, thank you sooooooooooo muchhhhh for teaching such deep topics.
*WHY IT WILL NOT TAKE 2 CYCLES?* - in the total 8 bytes of memory stack, if total 5 bytes are required for 2 variables (1 int + 1 char) then to process 5 bytes from any location, 2 times the memory has to be accessed if the system can access only 4 bytes at one time. So how does it make sense to use 1 bytes first and 4 bytes at last of the memory stack?
Hi Jenny ,you have prepared very well and do lecture in a elegant and detailed explanation.I like your way of teaching .Thanks sister
Well explained thank you madam
mam there is no teacher like you. your teaching style make me big fan of you love from heart..❣❣
Jayanti mam I love u your teaching habit
Thank you so much Jenny mam
Increasing or decreasing order
is structure padding only for structures or all codes(in void main int a ,char etc)?
Mam I'm currently doing job
But now I have decided I wil study and try to understand u
Love you mam 😘😘
I'm from Mars, your videos helped me a lot :D
Well jokes apart, you're helping hundreds and thousands one night before ecams. Thanks lot
From ANDHARA PRADESH 💞🥰
I m following this playlist... I hope I get here soon 😅😅
Mam after structure packing pls cover enum, malloc, calloc, realloc !
Don't forget to cover these topics mam pls 🥺😕
You have also replied on my comment "Okie" so pls don't forget to cover these topics mam please pls 🙏😄
instead of increasing decreasing will more reduce size e.g - int a,char b then 4 byte will take at 0 to 3 and char will place at 4 so total will be 5 where in increasing it is 6
had the same doubt..i do think so it ahould be decreasing order itself
Hi Ma"am. Hope you will be doing Great.I am your biggest fan. I love the way you speak, the way you deliver the Lectures.
We understand it Very Very.... Well. keep doing it . Thanx
hello mam, Thankyou for give answer of what is padding beacause of this question asked in my interview and unfortunately i don't know then after i search on youtube/google and after this i found this video
Thank you so much ❤
if there is only char c in a structure, it should assign 4 byte of memory. but when executing it gives only 1 byte???
thank you madam
I really love your explanation.❤
class Example {
char c;
int i;
short s;
}; what will be the total size for this ?
Hi mam I am from Pakistan ur teach style is very well
awesome mam noone tell be about this concept
One thing is missing, to reduce memory wastage one should always use packing rather than writing elements in increasing order of their size. CPU cycles does not matter.
Third Like Mam.Love From Andhrapradesh..
Mam your videos are very useful
Please answer,
#include
Struct abc{
Int a;
Char b;
Int c;
}var;
Void main() {
Printf("%d bytes", sizeof(var));
}
Output : 12 bytes
Whereas i am expecting the output to be "16 bytes" [4bytes(for a)+1bytes(for b)+3bytes(padding)+4bytes(for c)+4bytes(padding)] coz my system is of 64bit and word size has to be of 8bytes.
nope for int 4 bytes and char has 1 byte remaining 3 are padding and other int has 4 bytes totally 12 bytes
I am big fan mam
I defined int,char,int in 64 byte computer. I expected sizeof this struct 16 byte but it was 12 byte. 4(int) + 1(char) + 3(blank) + 4(int) = 12byte. Why is it like this ? Shouldn't take also 4 byte ?
I have also been asking the question but it is mostly ignored. What I found out from research is that compiler sometimes perform additional optimizations or the compiler settings may be affecting the structure behaviour, Compiler behavior can vary, so it's worth checking the documentation or specific compiler settings to understand the exact behavior in your case
Often the structure will be aligned to the size of the largest member in the struct, so because the strict has int the max size of a member is 4 bytes and the struct is 4-bye aligned as a result. 🙂
this was the situation in my case, I confirmed this by iincluding a long datatype and the size became 24 meaning the compiler made the byte-alignment according to the largest member of the struct, if not I should have gotten 20 instead for a 4-byte alignment,
thanks maam
Ma'am how many memory will be allocated for double and long ,i mean how many data cycles ?
Mam please complete DBMS and DAA mam
I proud of you 👏
Mam explain structure and functions ,enumerated datatype
if i take double with 2 char so how padding would done?
Mam Plzzz Upload video of N Queen Problem by backtracking.........
Good
Ma'am please c++ ki series start karen....plzzz...aap bhut achha padhati h...muje aap se padhna h..
ua-cam.com/video/dKVzZk4Pr2A/v-deo.html C++
how padding reduce cpu cycle or increase speed as it will take 2 cycle for int and char , without padding it was taking 2 cycle so how it increase speed.
yeah, I think she made a mistake because in both instances it would still take 2 cycles for a 4-byte word addressing, but at the end of the day I guess she explained the concept well and explained it properly when she used three members at 12:35 (char, int, char) for the structure
@@monarchofaether actually she is right , i learnt after that many resources actually, if we only want to use either char or int without padding then cpu will process 1 cycle for 2 byte another cycle for remaining 2 byte int which is stored in anothee 8 byte address, but if you use padding then all byte of either int or char will be on one 8 byte address storage so if you only need to access int then it will run 1 cpu cycle. you can understand it as for accessing only one variable data type it is faster other wise we have to run unnecessary cycle
Jenny please make a video about how to avoid padding most important question in interviews
Mam also teach enum and file handling
Thank you mam, but there is one correction... Don't blame you,just want to help people..
There is little different theory...for padding
Let's take example: struct { double , char}
as per this logic on 64 bit machine, answer will be 8+1+3(padding)=12.
But Padding happens of the highest data type, like in our case highest is 8 byte, so next it reads as same byte(if there is less it will pad), so
8 + 1+7(padding)
If there are more variables then too it will keep padding to make it 8byte...
I don't blame Jenny but looks she missed something,btw she is doing the great job.
Please do try
{Double , int}
{Int , char}
{*p , char}
{Long double, char}
You will observe the results...
I am not here to criticize anyone.. I started learning from Jenny mam,n I respect her.
#Q Thank you for info. After structure padding may I know the process of data reading happen correct way.colud you please explain the process of read in unaligned and aligned structure?
ma'am at 12:35 using the same datatype in structure members is an error said by you in previous videos...Kindly clarify my doubt why you have written the same data type. Thank you.
Please do a class on dynamic memory allocation
Can a 32byte processor also allocate 4-4-4- bytes memory? 🤔
I am here just to say....😍😍
Madam can you please give one lecture about DMA, storage classes in c .
I have same size with structure padding and packing
I have size of structure packing mam
Solve issue
Mam if we use float
Structure s
{
Char *ptr;
Char c;
};
Size of structure in 32bit compiler it's giving size as 16,
Why not size is 12( 8 for pointer, 4 for char), it's word size is 4 right, so why not multiple of 4 size is not there
There is little different theory...bro, I got to know today...
Padding happens of the highest data type, like in your case highest is 8 byte, so next it reads as same byte, so
8 + 1+7(padding)
I don't blame Jenny but looks she missed something,btw she is doing the great job.
Lecture Starts at 2:15
Java, Android tutorial start Karo plzz
7:32
save memory save computer
Nothing but respect for you. Thank you for makin all of our lives easier. Amazing work!
mam nested structure nhi pdhaye hai please ak video bna degeye
Mam your all c program is available in the chanal
Mam how can we see it on a program
Madam Please Teach About LAMBDAS in C .... and C ++ ... Please Mam....
ua-cam.com/video/dKVzZk4Pr2A/v-deo.html C++
Ma'am, Theory Of Automata py bhi Series baneaya Ga.Ma na boht search kia tha lekin boht moshkil .
agar aap koi youtube channel ya notes etc share kardein.barii mehrobani hogi....thank you
Love From Pakistan.
struct abc {
char a;
char b;
}var;
For 32 bit processor (4 bytes word size)
sizeof(var) should be 4 bytes
but, I am getting result 2 bytes on my laptop after running this program.
If someone can answer, then please answer this.
Larger data type is 1byte. So it will take 2 bytes. Both are char.
sizeof() is the memory in bytes used from the allocated
allocated is the separated memory for that paticular struct. so ig it's showing you the memory used by the struct abc
My life is full of obstacles. (family,money and gf mrg proposal) mam... I am unable to understand everything. Help me mam please😫😫😫
Maddam je , can you explain master detail relationship plz in hindi 🙏🙏🙏🙏🙏🙏
ok we are done with DS now start C# and Kotlin
struct zzz{
int k;
int c;
char d;
}n;
why i am getting the size 12 ,instead of 16 in a 64 bit machine??
nope for int 4 bytes and char has 1 byte remaining 3 are padding and other int has 4 bytes totally 12 bytes
JAVA bhi sikhao na....pls
superrrrbbbbbbbbbbb mam g
❤️❤️❤️❤️
❤
I love you 💖 mam appko dak ka fidda hogiya
❤❤❤❤❤
And your subject
mam . when will start oops concepts , it is very important for us , please tell me mam , I am waiting your reply , please please mam , I humbly request to you.
Mam could you plz cover files in c mam please
Very interesting. Could you please do the lectures on design patterns also?
I love you ❣️ I like you 😍 I miss you 😘
Нормально прогнала за выравнивание, но английский, конечно, очень смешной.
You are so beautiful
You are beautiful mam
first view ma'am
Mam app bohut sundor ho apki marriage hogiya ?
I am failed in this question........ I'm watching it too late 😭😭
Good evening ma'am Iam in class 9 .
I see all your videos for information.
Ma'am agar aap ye comment padh rahi hai to please btaye 🙂
Programming sikhne ke liye English aana zaruri hai aur computer ka student hona zaruri h..
Mam Aap hairs Open Krke padaya karo Jyada samajhta hai..🥰🥰🥰
Came after seeing in CIS Θ 😂
@@exadulhaque9849 😅😆
Excuse me ms, im from indonesia. if possible please include indonesian subtitle. Im not good at english.
Love 💕 😘 you jennis, agar tum mil jao jamana chod denge ham
Fidda fidda fidda
Pls
Hi mam iam the first who is watching your new video plz if u read my comment plz mention me
take care jenny maam 🙂🙃😉
Madam are u married or you have a boy friend
Because so beautiful