1. Padding is introduced in memory allocation to ensure proper alignment of data within structures. CPUs have specific memory alignment requirements for different types of data. When you have a structure containing different data types, the compiler might insert "padding bytes" between members to align them according to the CPU's requirements. 2. Greedy alignment refers to the practice of arranging the members of a structure or class in such a way that padding is minimized. By placing members with larger alignment requirements before those with smaller alignment requirements, you can potentially reduce the amount of padding required. In languages like C++, where memory layout has a significant impact on performance due to cache lines and memory access patterns, arranging members to minimize padding can lead to better memory utilization and potentially improved runtime efficiency.
"Grid Alignment" refers to arranging data members according to the system's memory boundaries, and "Padding" involves adding extra bytes to achieve proper alignment of data members within classes or structures in Object-Oriented Programming.
After 3 months my placement are coming and this course is very helpful in reversing the concepts and making me more confident In coding . I will recommend this channel to my juniors for learning dsa at an excellent level. Thankyou sir for making this course
It took me a day to complete this. There were so many things to tinker with. I solidified what I learned here. Did quite a lot of experiments. SHAKTIMAN++
That concept of padding and greedy alignment was so cool . I'm watching this lecture after college and I was a little dizzy , but after that I'm ready to go for another hour .
Homework Solutions - 01:16:47 1. **`const` Keyword**: The `const` keyword in C++ signifies that something cannot be modified. When applied to variables, it means the variable's value can't be changed. For pointers, it can mean that the pointer can't change what it points to or that the data it points to can't be changed, depending on its placement. ```cpp const int x = 10; // x cannot be modified ``` 2. **Using `const` in Object Creation and Member Data**: - **Object Creation**: When you declare an object as `const`, it means you can't modify any of its data members (unless they are declared as `mutable`). ```cpp const MyClass obj; // obj's members cannot be modified ``` - **Member Data Types**: When a class data member is declared as `const`, it means that member cannot be modified after the object is constructed. ```cpp class MyClass { private: const int x; // x must be initialized in the constructor and cannot be modified afterwards }; ``` 3. **`const` Functions**: A member function that is declared `const` promises not to modify any non-mutable member variables of the object for which it's called. This allows you to call the function on a `const` object. ```cpp class MyClass { public: int value = 0; int getValue() const { // A const member function return value; } void setValue(int v) { // Non-const member function value = v; } }; const MyClass obj; int x = obj.getValue(); // OK to call // obj.setValue(5); // Error, because setValue is not a const function ``` 4. **Initialization List**: Initialization lists are used in C++ to directly initialize data members of a class. They are particularly useful for initializing `const` members, member objects without a default constructor, and reference members. ```cpp class MyClass { private: const int x; int &y; // Reference to an integer public: MyClass(int value, int &ref) : x(value), y(ref) { // x and y are initialized using an initialization list } }; int main() { int externalInt = 5; MyClass obj(10, externalInt); } ``` In the above `MyClass`, the `x` member is a `const` integer and must be initialized using an initialization list in the constructor. The `y` member is a reference and also must be initialized using the initialization list.
You are the gift to programmers sir many many thanks to you.. May Allah keep you happy and healthy ,wealthy(Ameeen)... Sir Your teaching way is just Amazing. I have No words for your teaching..
brooooo you are just awesome .....your teaching is too good i am able to understand everything thankuuuuu... today is 5/02/2024 currently studying it for SEM 3rd exams but after my exams i will learn c++ then will do DSA from you .......i promise to be serious about my future
aapne paul ka hoa yaaad dualaya bhot achha lga sunke... thats why i love your content sir... its not just plain studying.. you relate everything.. nothing seems boring and hours and hours go away without even noticing..... god bless you siir !!!!!!
i have never watched an educational video so long in one go .This felt like a movie which not let you leave your seat .. So good and kept up hold to study for long hour::
usually i don't comment on any video.. but this time can't stop my finger....thank you thank you so much sir ... for making my concepts clear and giving me confidence...... :)........
Padding is used to prevent the unnecessary wastage of CPU cycle by creating empty block in memory. But Greedy alignment ka koi refrence nahi mil raha hai bhaiya.
Much awaited video aa gayi hai, bcoz ab tak sirf theory padh rahe the but is bar interview me kaise pucha jata hai, uske according padhne wale hai. So excited for this.
Hi, As you’ve interviewed with DE Shaw, you have a deep understanding of the extent to which OOP concepts are asked in their interviews. Could you please suggest additional resources for mastering OOP?
Hello sir Just a small suggestion. Can you also share the resources which you follow to prepare for videos, so that we can also deep dive into the topic apart from watching video.
Timestamp- 9:15 Please talk about structural padding and packing sizeof will not give 5 if class contains an int followed by a char or vice versa This video is very helpful. Thanks Babbar
This is the best explanation of oops concept..!! Startingly i got rejected in technical rounds because i don't know much about oops..!! When i completed these two videos of oops then i'm getting qualified in technical and getting rejected in hr rounds.. double oops...!!😂..!! Finally i made it..!! And got selected..!! Thank you so much...!! Your whole series of this DSA concept is awesome..and this oops is just fab...!!!
Please add the the explanation of greedy alignment and padding in next video,unable to get the clear understanding of it. But want to know so please add it to next video.It's a request.
Padding meaning in Urdu " Bahrti - karna " matlab ka add karna char ' A '; ' A ' ki value hexa-decimal ma 10 hoti ha A = 10; 10 ko binary ma convert karana ka liya hama 2 ka sath LCM lana ho ga A = 10 = (1010) or is ki base 2 sa multiply karan ga In Right-side-start 0 = 2 ^ 0 = 1 1 = 2 ^ 1 = 2 0 = 2 ^ 2 = 4 1 = 2 ^ 4 = 8 so 1byte = 8 bits = 4 parts ( 1, 2 , 4 , 8 ) So A will be store in 1 and 2 , 4 , 8 is empty so In case off padding its also be store or add empty values
Awesome, congrats bhaiya❤️🎉 ‼️One complain from you bhaiya, You don't accept linkedIn request!👀 How would we ask for referral from you if you don't accept?😔 You said in previous live that you would reffer us, in future!🤩
Thanks bhaiya for teaching OOP's concept in so much depth and details... there are so many things which are new to me and I have understood them.... joshHigh++
@@aniketmukhopadhyay2271 yes they are enough but make sure to practice a lot and clear your doubts while practicing at that time only by yourself and you are good to go not only for exams but for anything
Bhaiya sahi chl rhe hai bss ese he m aur mere sath k babbar class k mates agle 6 month m ya 1 year koi achi job fod dengey and sach bolu toh app he sabsi motivation ho reason btane ki jaruart nh but fir bh bta deta hu continues classes till today esa koi nh krta aur nahi ab tk mene koi dekha hai thankyou from one of your student!! vase job k baad apke channel m interview toh logey na mera........?? till that day let's learn something new today too.......
Greedy align and padding i searched myself and got to know that Our operationg system is of 32/64 bits And if our OS is 64 bits it means that the compiler will read 8 bytes at a time if OS of 32 bits compiler will read 4 bytes at a time Here as we have one int and one char which mskes up 5 bytes the rest 3 bytes will be added as padding so that compiler can read 8 bytes easily ... This also leads to memory wastage ... This is what i got to know after searching .... Please correct me if i sm wrong
bhaiya aapko na isse 2 part mein padhana chayea tha ek saath access modifier constructor sb bta diye to the point bolu to muze constructor samaz nhi aaya ab dubara dekhunga but aage se 40-45 min ka hi video bnana
29:03 pe jo aapne boli hai ki paid me bhi nhi hoti hai ekdm shi baat hai ...koi structure/class padding nhi sikhata ...jbki interviewer mje lene ke liye puch hi leta hai.
Ek shanka hai.... If STATIC members are being manipulate by objects , toh k fayda... Static members ko static family k through hi access Kiya jaa sakta hai?
class A { int a; char b; short int c; char d; }; SIze allocating in this set of members is - 12 bytes. Can anyone please explain this ? According to my understand it must allocate 8 bytes. word size - 4 bytes. 1 - a a a a 2 - b c c d
Brother, I really felt this was not well explained by you! Maybe I'm wrong because so many here are praising you , but I gave my best to this lecture and think it's so so so confusing!
Bhiaya BeckTracking Ke Or Questions Krwane Wale The Aap ? Like Suduko Solver,N Queens, Knight Tour Etc..Aapne Bola Tha Ki BackTracking Abhi Khatm Nhi Hui Hai...😔
at 1:00:16 I have a doubt : this->name is a pointer to character array and name passed to setName is a character array and parameters passed to strcpy should be ( character array, character array) . But here it has parameters like (pointer to character array, character array). How is this working??? Please someone explain...🙏
why an object take 8 byte when we put int and char collectively class solution{ public: int age; char name; }; why it take 8 byte ?????@codeHelp-by Babbar
1. Padding is introduced in memory allocation to ensure proper alignment of data within structures. CPUs have specific memory alignment requirements for different types of data. When you have a structure containing different data types, the compiler might insert "padding bytes" between members to align them according to the CPU's requirements.
2. Greedy alignment refers to the practice of arranging the members of a structure or class in such a way that padding is minimized. By placing members with larger alignment requirements before those with smaller alignment requirements, you can potentially reduce the amount of padding required.
In languages like C++, where memory layout has a significant impact on performance due to cache lines and memory access patterns, arranging members to minimize padding can lead to better memory utilization and potentially improved runtime efficiency.
thank you very much 👍👍
Shukriya janab Love from Pakistan 🇵🇰
Thanks bhai
Thanks brother 👍
Worth watching for 1.5 hr.
Understood Everything.
Great 👍.
Keep it up.
"Grid Alignment" refers to arranging data members according to the system's memory boundaries, and "Padding" involves adding extra bytes to achieve proper alignment of data members within classes or structures in Object-Oriented Programming.
After 3 months my placement are coming and this course is very helpful in reversing the concepts and making me more confident In coding . I will recommend this channel to my juniors for learning dsa at an excellent level. Thankyou sir for making this course
Mine tooo
You are too late man.These lectures are just basic
@@111rhishishranjan2 dont demotivate others, anything can happen with hardwork
Engineering will always be better
@@111rhishishranjan2 Lol. People crack job interviews without learning OOPS also, while you are saying this in not enough.
It took me a day to complete this. There were so many things to tinker with. I solidified what I learned here. Did quite a lot of experiments.
SHAKTIMAN++
bhai toh lagataar ek baar mai dekha kyuki merko pura din laga notes banana smjhna?
That concept of padding and greedy alignment was so cool . I'm watching this lecture after college and I was a little dizzy , but after that I'm ready to go for another hour .
Sir, you are great. You've taught OOPS in such a way that, no one has ever taught me. Superb teaching method...
Bhai suno tumse kuch puchna tha??
man as you said earlier this series is absolutely top-notch and the best.
1:01:00 solution :- #include "include this library" to your program
Homework Solutions - 01:16:47
1. **`const` Keyword**:
The `const` keyword in C++ signifies that something cannot be modified. When applied to variables, it means the variable's value can't be changed. For pointers, it can mean that the pointer can't change what it points to or that the data it points to can't be changed, depending on its placement.
```cpp
const int x = 10; // x cannot be modified
```
2. **Using `const` in Object Creation and Member Data**:
- **Object Creation**: When you declare an object as `const`, it means you can't modify any of its data members (unless they are declared as `mutable`).
```cpp
const MyClass obj; // obj's members cannot be modified
```
- **Member Data Types**: When a class data member is declared as `const`, it means that member cannot be modified after the object is constructed.
```cpp
class MyClass {
private:
const int x; // x must be initialized in the constructor and cannot be modified afterwards
};
```
3. **`const` Functions**:
A member function that is declared `const` promises not to modify any non-mutable member variables of the object for which it's called. This allows you to call the function on a `const` object.
```cpp
class MyClass {
public:
int value = 0;
int getValue() const { // A const member function
return value;
}
void setValue(int v) { // Non-const member function
value = v;
}
};
const MyClass obj;
int x = obj.getValue(); // OK to call
// obj.setValue(5); // Error, because setValue is not a const function
```
4. **Initialization List**:
Initialization lists are used in C++ to directly initialize data members of a class. They are particularly useful for initializing `const` members, member objects without a default constructor, and reference members.
```cpp
class MyClass {
private:
const int x;
int &y; // Reference to an integer
public:
MyClass(int value, int &ref) : x(value), y(ref) {
// x and y are initialized using an initialization list
}
};
int main() {
int externalInt = 5;
MyClass obj(10, externalInt);
}
```
In the above `MyClass`, the `x` member is a `const` integer and must be initialized using an initialization list in the constructor. The `y` member is a reference and also must be initialized using the initialization list.
thank you so much..
Chatgpt
bro which IDE he is using
@@amarjitrohit8819 Visual Studio Code
Just revising all topic in better way through these videos💯
U can use ctrl + '/' to comment multiple lines and ctrl + 'L' to clear the terminal bhaiya. Loving your course.
Code with Harry se sikhe ho kya bhai 😀
Never compromised with content, does't matter how much time needed..
Great work bhaiya :)
Very understanding videos.... Examples are real life thing.... Anybody can understand your video bhaiya💗❤️
You are the gift to programmers sir many many thanks to you.. May Allah keep you happy and healthy ,wealthy(Ameeen)...
Sir Your teaching way is just Amazing.
I have No words for your teaching..
brooooo you are just awesome .....your teaching is too good i am able to understand everything thankuuuuu...
today is 5/02/2024 currently studying it for SEM 3rd exams but after my exams i will learn c++ then will do DSA from you .......i promise to be serious about my future
you are amazing person with clear cut knowledge and style of course is superb. serving Nobel cause of education for all.
respect for you 🏅🥇
really great
Bhaiya you made me fall in love with your series🤩!!! watched 10 videos in a single row.....just love the way you teach in a simplified way.
PIRO COMDER SPOTTED
Ek hi poori nahi ho pati, yaha 10 in a row... Kaise kar lete ho bhai/behen ?
@@nareshvasuja3506 uss din hi dekh pai thi fir bimar hogyi😂....ab thoda ye task mushkil lag raha h
@@kirtiverma4924 😅😂😂
@@kirtiverma4924 Iss video ko samajne mai merai ko 2 din lag gye pura keetai krrtai 🥲🥲🥲🥲🥲
aapne paul ka hoa yaaad dualaya bhot achha lga sunke... thats why i love your content sir... its not just plain studying.. you relate everything.. nothing seems boring and hours and hours go away without even noticing..... god bless you siir !!!!!!
i have never watched an educational video so long in one go .This felt like a movie which not let you leave your seat .. So good and kept up hold to study for long hour::
Maza aa gaya..bohot kuch sikha aur samjha.. badhiya content.
Respect and Efforts++ 🔥✅🙌🏻
The best thing about your courses is their 'simplicity'...
that is what Indians want now...
so your courses stand out !!
usually i don't comment on any video.. but this time can't stop my finger....thank you thank you so much sir ... for making my concepts clear and giving me confidence...... :)........
Most awaited session from last couple of days Bhaiya......
Awesome lectures ....
All d best bhaiya,🤗🤗🤗
YES he is great one, DIDI
Friend function sikhaya hai kya live Babbar bro me
really love the consistency os+ds on track thank you so much
int is not always 4 bytes, it depends on platform. it is at least 2 bytes and max 4 byte , as per c++ specification till now.
Never seen oops concept like this you explained every concept deep
Padding is used to prevent the unnecessary wastage of CPU cycle by creating empty block in memory.
But Greedy alignment ka koi refrence nahi mil raha hai bhaiya.
Also called as Data Structure Alignment, just search its available on GFG.
greedy alignment mtlb ki data type ko particular way me alighn krna taaki vo minium processing cycle me jyada data types ko fetch aur process kr paye
It’s on javatpoint
watched this video 2 times and now i feel lot of comfidence when someone talks about OOPs 😃😃
@007_roushankumar7 can you explain about double pointer in oops😂😂
Unbelievable teaching experience such a nice teaching way 😃😊
bhaiya your oops series is one of the best on you tube
bty sir aapne videos ni dale kuch dino se ?... just asking.
Much awaited video aa gayi hai, bcoz ab tak sirf theory padh rahe the but is bar interview me kaise pucha jata hai, uske according padhne wale hai. So excited for this.
And here comes the video that we were waiting for since last couple of days ...!! 😅😁🙌🥳
Where is the complete notes bro? Please reply🙏🙏🙏
Hi, As you’ve interviewed with DE Shaw, you have a deep understanding of the extent to which OOP concepts are asked in their interviews. Could you please suggest additional resources for mastering OOP?
Simply Wow! Get to learn some new concepts in addition to what i have learned.
The depth of the conceptsis just amzing
Hello sir
Just a small suggestion. Can you also share the resources which you follow to prepare for videos, so that we can also deep dive into the topic apart from watching video.
vs code
u will get in google
Very much impressed with the concept of padding and greedy alignment. Understood something new🙌🙌
I really want to thank you for making combined play list for cpp and dsa thank you so much really appreciated once again thank you
Timestamp- 9:15
Please talk about structural padding and packing
sizeof will not give 5 if class contains an int followed by a char or vice versa
This video is very helpful. Thanks Babbar
Thanks, please keep releasing DS video daily without break 🙏
This is the best explanation of oops concept..!! Startingly i got rejected in technical rounds because i don't know much about oops..!! When i completed these two videos of oops then i'm getting qualified in technical and getting rejected in hr rounds.. double oops...!!😂..!! Finally i made it..!! And got selected..!! Thank you so much...!! Your whole series of this DSA concept is awesome..and this oops is just fab...!!!
Where did you get the job? Did you just watched only this playlist?
Where did you get placed.... Did you follow just this playlist or something extra too @priyabharti2818
I really love this series ♥️ thanks sir
You are really a leagend 👍🏻
Please add the the explanation of greedy alignment and padding in next video,unable to get the clear understanding of it. But want to know so please add it to next video.It's a request.
Keep the pace high!!
As we are getting back to online classes I can give maximum time to this.
Present bhaiya
Lots of love❤
which sem?
@@KajalSinghshine 1st semester
@@sherebanoburhani8939 bhai life enjoy kro 1st sem se kn pdta h
@@only_for_fun1234r hehe
ua-cam.com/video/QTaiF8N6i3Y/v-deo.html
Padding is the addition of some empty bytes of memory in the structure to naturally align the data members in the memory.
Your method of teaching is outstanding sir you deserve millions likes and subscriber👀🔥
Padding meaning in Urdu " Bahrti - karna " matlab ka add karna
char ' A ';
' A ' ki value hexa-decimal ma 10 hoti ha A = 10;
10 ko binary ma convert karana ka liya hama 2 ka sath LCM lana ho ga
A = 10 = (1010) or is ki base 2 sa multiply karan ga
In Right-side-start
0 = 2 ^ 0 = 1
1 = 2 ^ 1 = 2
0 = 2 ^ 2 = 4
1 = 2 ^ 4 = 8
so
1byte = 8 bits = 4 parts ( 1, 2 , 4 , 8 )
So A will be store in 1 and 2 , 4 , 8 is empty so In case off padding its also be store or add empty values
Paul's supperpunch,jin kazama everything was just ❤
Going to see it tomorrow but thank you so much for the consistency brother, god bless you.
All things are clear and concise....Thanks Babbar Bhaiya
Awesome, congrats bhaiya❤️🎉
‼️One complain from you bhaiya, You don't accept linkedIn request!👀 How would we ask for referral from you if you don't accept?😔 You said in previous live that you would reffer us, in future!🤩
Thank you sir apk is lec say mera oop ka paper acha hogea, pehli bar mujay oop programming sai say smaj ai hai ❤🎉🎉
Thanks bhaiya for teaching OOP's concept in so much depth and details... there are so many things which are new to me and I have understood them.... joshHigh++
ua-cam.com/video/ogUtrqDmiqs/v-deo.html Azure and Azure DevOps interview with #wipro and #microsoft especially for Midlevel and Beginners
Bro , is this two videos are enough for semester exam?
@@aniketmukhopadhyay2271 yes they are enough but make sure to practice a lot and clear your doubts while practicing at that time only by yourself and you are good to go not only for exams but for anything
Bhaiya sahi chl rhe hai bss ese he m aur mere sath k babbar class k mates agle 6 month m ya 1 year koi achi job fod dengey
and sach bolu toh app he sabsi motivation ho reason btane ki jaruart nh but fir bh bta deta hu continues classes till today esa koi nh krta aur nahi ab tk mene koi dekha hai thankyou from one of your student!!
vase job k baad apke channel m interview toh logey na mera........??
till that day let's learn something new today too.......
Finally I got this topic. I am waiting for this topic since last couple of days.....🙏 Thank u bro.....🙏🙏🙏😂😂🥳🥳
Seen first time, things seem familiar. Will try to make notes of it on the second watch, today's night or maybe tomorrow...
Oct'10, 2023 05:51 pm
Greedy align and padding i searched myself and got to know that
Our operationg system is of 32/64 bits
And if our OS is 64 bits it means that the compiler will read 8 bytes at a time if OS of 32 bits compiler will read 4 bytes at a time
Here as we have one int and one char which mskes up 5 bytes the rest 3 bytes will be added as padding so that compiler can read 8 bytes easily ... This also leads to memory wastage ...
This is what i got to know after searching .... Please correct me if i sm wrong
Thank you, sir, for such awesome lectures, it really helps a lot in the time of need...
bhaiya aapko na isse 2 part mein padhana chayea tha ek saath access modifier constructor sb bta diye to the point bolu to muze constructor samaz nhi aaya ab dubara dekhunga but aage se 40-45 min ka hi video bnana
Finished watching the entire video. The content was awesome. Keep rocking!!
OS ka intro ek number bhaiya ❤️🎉
Osm bhaiya❤️🔥🔥🔥🔥🔥🔥🔥🔥
Finally! Oops concept is here. Op consistency 😎
29:03 pe jo aapne boli hai ki paid me bhi nhi hoti hai ekdm shi baat hai ...koi structure/class padding nhi sikhata ...jbki interviewer mje lene ke liye puch hi leta hai.
With these kind of videos no one can stop getting me placed in top MNC's.
you are such an amazing teacher.!!
best video for learning oop. i have seen many channels but this one is flawless.
Meanwhile Ramesh ,"Abe yaar main itna famous hogya" 😂🤣😂😂
😂😂
I have learned oops in python and this lecture cleared my concept about oops in c++. Im starting DSA in c++
51.41
gajb bazzati hai
litterly i saw this 3 times for more and more better understanding
Meri kal exams hai aur Mai Aaj lecture dekh Raha hu 😅😢😅
Meri be kal exams hain 😅😅
@@user-os2jb2hq5fkaisa gya exam tumhara
Meri abhi 2 ghante mein hain.😅
😂us
Meray 1 gheintay bad
Ek shanka hai.... If STATIC members are being manipulate by objects , toh k fayda...
Static members ko static family k through hi access Kiya jaa sakta hai?
wasted 1 hour and not learnt something , sorry bhaiya but constructor is something complicated and pls tell the need before explaining it
Constructor is used to initialize object without using external methods
He has explained everything very nicely
Bhai kaunse channel par badhiya se sikhaya hai constructor??
Pls batana agar pata hai toh
Code with Harry
Bhai to pehlii basic seek lay phir akay constructor dhek layna
thankyou
Thank you so much bhaiya apka channel crores m views paae aur hindustan k Engineer to skills pradan kre
thanks love babber bhai for this quality education in the youtube
Learn new concept after watching 3 4 videos from other ytubers ,u r great sir
class A
{
int a;
char b;
short int c;
char d;
};
SIze allocating in this set of members is - 12 bytes.
Can anyone please explain this ?
According to my understand it must allocate 8 bytes.
word size - 4 bytes.
1 - a a a a
2 - b c c d
padd hi liya and mujhe pta h dobara aaunga ispe in future
why don't you make a string insted of a char array ? wouldn't it be much easier to use c++ abilities ?
29:09 it seems like some important message had been seen by sir🌻
Brother, I really felt this was not well explained by you! Maybe I'm wrong because so many here are praising you , but I gave my best to this lecture and think it's so so so confusing!
Padding vala bahut sahi bataya...kabhi kisi ne YT me nahi bataya.
Finally understood the actual meaning of (this pointer) after so many years!!!
Bhiaya BeckTracking Ke Or Questions Krwane Wale The Aap ?
Like Suduko Solver,N Queens, Knight Tour Etc..Aapne Bola Tha Ki BackTracking Abhi Khatm Nhi Hui Hai...😔
best tutor online, bhaiyya saare doubts in depth clear hogaye!
Classes contains class members which can be accessed by a processor in chunks of 4 bytes at a time.
watched till end! kaffi lamba tha but worth it tha time invest krna isme
Sir please start classes for data structures and algorithms using c.
Best"est" Lecture on OOPs by far bhaiya!Hats off👏
best teacher on youtube for coding
at 1:00:16 I have a doubt : this->name is a pointer to character array and name passed to setName is a character array and parameters passed to strcpy should be ( character array, character array) . But here it has parameters like (pointer to character array, character array). How is this working??? Please someone explain...🙏
why an object take 8 byte when we put int and char collectively
class solution{
public:
int age;
char name;
};
why it take 8 byte ?????@codeHelp-by Babbar
read about class alignment in c++
@@rhl_ thanks for your effort already discovered it
aap editor konsa use kr rahe ho
@@mohitahir6020 Sublime text , lightweight and clean.
very informative lecture, thank you bhaiya!
AOA
in the first part you made class with char name[], int age,..
but i was unable to set value to char name will using in main() ???
please guide
Is video ko dekh ke logo ki placement lagi hai bhaiya Dil se respect++
Good explanation, amazing way of teaching, thank u.
bhaiya... bhaiya phle majburi m shuru kiya tha lekin ab mja aane lga h
Thanks brother for such a nice, simple and amazing video.