Happy New Year, ye saal Macha do aap sab achee se... Class and Object ka Concept agar clear hgya hai, toh Like kar dena video.... 500 Like Target❣ Time Stamp Add kar dena aap aur Homeworksheet bhi
46:00 The size of an empty class in C++ is 1 byte because the compiler needs to allocate at least 1 byte of memory to each object. This is to ensure that each object has a unique address. If an empty class had a size of 0 bytes, then two different objects of the same class could have the same address, which would be a problem👍
Hello Rohit sir I must say you are the only one on TH-cam who not only explains the topic but also make it familiar with the real life scenario it literally helped me alot thankyou so much sir
Bhaiya Bhot Sare youtubers ki videos dekhi khi sa samajh ni aae thi oops par why fear when rohit bhaiya is here bhiya kya padhate ho aap dhang sa samagh aae aaj ye Thanks Bhaiya ❤
1 byte is the bare minimum space to be allocated to an object, a class never gets space in memory, but only an instance of a class/ object gets. Whether object has data and functions or not, despite of that just because it is created it has to be uniquely defined in memory. While in C (objects not introduced uptill then), the 0-byte logic was supported. This 1 vs 0 was introduced to distinguish between the two languages.
In C++, an empty class still occupies memory space, typically one byte. This is because C++ requires objects to have distinct memory addresses, even if they don't have any member variables. So, even though an empty class doesn't contain any data members, it still needs to have a unique address in memory, which requires at least one byte. This ensures that two instances of an empty class will have different addresses, which is important for pointer arithmetic and type distinction. However, the exact size of an empty class may vary depending on the compiler and platform.
The best playlist I found on TH-cam, i get a clear understanding of class and object. Thank you bhaiya for such a great work. Master aur bachelor me different to hota hi hai 😆😆😆(joke soke)
Time stamps : 0:00 Introduction 1:18 Object-Oriented Programming (OOP) 13:36 OOP Implemention 17:40 Access Modifier 22:49 Class 23:52 Setter function 28:45 Getter Function 35:28 Object 43:26 Size of Class 44:05 Size of Object 45:59 Empty Class 47:45 Padding Concept 1:03:55 Dynamic Memory Allocation in OOP
59:10 at this point. Just because of we have declared integer variable between the character variable so that's why we are facing the wastage of memory. So should we be careful while declaring the variable in the sequence ?
bhaiya java ka oops ka video laye na please Rohit bhaiya mast app concept smjha deye mujhye abhi taak 15-20 video dekh chuka but smjh nhi aya but isay mujhye clear ho gye mastt bhaiya love you so much
Bhaiya in padding concept if we initialize Char a. //1+3(padding) Int b //4 Char c. // 1+3(padding) Double d. //8 Then total size will be 20 na🧐🧐1:03:48
In C++ why size of empty class is 1 byte? Ans - In C++, an empty class is typically required to have a non-zero size, and the size is usually 1 byte. This is due to the standard's requirement that the size of an object must be at least 1 byte. The reason behind this is to ensure that distinct objects in an array have unique addresses. If the size of an empty class were zero, then two adjacent objects of that class in an array would have the same memory address, violating the requirement that each object should have a unique address. To ensure proper memory management and alignment, the C++ standard specifies a minimum size for objects, even for empty classes. Keep in mind that the actual size of an empty class may vary depending on the compiler and its settings.
Happy New Year, ye saal Macha do aap sab achee se... Class and Object ka Concept agar clear hgya hai, toh Like kar dena video.... 500 Like Target❣
Time Stamp Add kar dena aap aur Homeworksheet bhi
Sir tree kab start hoga bahat time hogaya he
Bhaiya maja aagya sach mein, kaafi kuch new sekha
Placement series bhaiya please
I'm your biggest fan
Placement series bhaiya please
I'm your biggest fan
Placement series bhaiya please
I'm your biggest fan
Bhai, Padding concept chamka diya behtreen... poore TH-cam pr itna deep me, itna clarity ke saath koi nhi padha skta. It's more than paid course.
You're really an awesome teacher 💜.
Baap of all lectures in yt for oops itna deep mei koi padhaya hota pura yt mei ..bhaiya salute to u
I must say, this is the best DSA playlist without any doubt. Literally every concept is taught. REVOLUTION !
@@pratikdhametry
46:00 The size of an empty class in C++ is 1 byte because the compiler needs to allocate at least 1 byte of memory to each object. This is to ensure that each object has a unique address. If an empty class had a size of 0 bytes, then two different objects of the same class could have the same address, which would be a problem👍
Thankyou for this kindly information ❤
Rohit Bhaiya aap jis tarike se padate ho, wo unique hai, seedha ratana start ni karte baaki bebbar bhaiya, shurdha didi ki tarha
Obhi acha hi padata hain BC
bhai tune kintne lecture kar liye hai
you are absolute right!
All the future Aspirant, Mein aapko bolna chahungi, ye Best Series hai OOPS ki, first time I have really Understood it, Thanks bhaiya❤
Is that good for DSA in C++
Hello Rohit sir I must say you are the only one on TH-cam who not only explains the topic but also make it familiar with the real life scenario it literally helped me alot thankyou so much sir
Welcome ❤️
iam fallen love at 32:11
is ke liye to kam se kam 4k likes bantha he
sach mein ye best playlist hai dsa samajne keliya
don't underestimate it
Sab kuch chamak gaya Rohit Bhaiya
Baghth Badhiya concept the.
Thanks_a lot😃😃😃😃😃😃😃😃😃
Bhaiya kya concept deliver kiya hai aapne ekdam baap level concept mja aa gya ekdam ......meko sab se aacha padding ka concept jan kr mja aaya ☺☺
is se acha OOPS ka playlist or kahi nahi milenga meri gurantee(kyuki me sari chant chuka hu)
Bhaiya Bhot Sare youtubers ki videos dekhi khi sa samajh ni aae thi oops par why fear when rohit bhaiya is here bhiya kya padhate ho aap dhang sa samagh aae aaj ye Thanks Bhaiya ❤
bhaiya pahle baar doubt clear huwa class and object and use cases thanku bhaiya from jharkhand
One of the best lecture on TH-cam
1 byte is the bare minimum space to be allocated to an object, a class never gets space in memory, but only an instance of a class/ object gets. Whether object has data and functions or not, despite of that just because it is created it has to be uniquely defined in memory. While in C (objects not introduced uptill then), the 0-byte logic was supported. This 1 vs 0 was introduced to distinguish between the two languages.
Sir mai pahli salary aapko bhet karunga
Bhai mere ko 1k ka help krdo
Mai v
@@CodeWithSonu_Shark then bro placement ke time ess badlaav ko bhul mat Jana ..
😂👍@@deepanshurana5586
Toh bhai placement lagi ya nahi
Kya Gajab padhate ho bhaiya aap✨✨😊😊
Dear Sir a huge respect and Love From Pakistan, may you got your desireble success and hapiness.
Bhai motivation ka video next level tha Bhai 😂😂😂😂
Chalo sahi hai fr toh❣
sir aap bohat achhe se padhate ho,
sir Template function and class pe 1 video banao na .
Gajab bhaiya padding and alignment ke sare concept clear hogaya.
thank you soo much sir free main itna deep kisine bhi nahi padhaya tha
great lecture bhaiya
waah bhaiya waah...kya makkhan tarike se samjhaya hai....❤❤
Bhaiya bhot heee jayaad amazing lecture tha maja aya chamak gaya and kaafi kuch seekhne ko mila 💖
best vdo of yt
Bhut achchhe se samajh me aa gya ,oops me dimag kharab ho rha tha mera youtube dhang se kahi samajh me hi nhi aa rha tha
In C++, an empty class still occupies memory space, typically one byte. This is because C++ requires objects to have distinct memory addresses, even if they don't have any member variables. So, even though an empty class doesn't contain any data members, it still needs to have a unique address in memory, which requires at least one byte. This ensures that two instances of an empty class will have different addresses, which is important for pointer arithmetic and type distinction. However, the exact size of an empty class may vary depending on the compiler and platform.
Sir mai roj aapki video aane ka intjaar karta hoon besabri se.
Sir hamlogo ke liye placement series bhi isi tarike se layiye
OOP lecture 1 chamak gaya ✅✅✅
46:20 Har object ki address unique hona hai (even it is empty class), isliye 1 byte de dete hain.
best padding tehnique i have ever seen
love from uttarakhand negi ji
The best playlist I found on TH-cam, i get a clear understanding of class and object. Thank you bhaiya for such a great work.
Master aur bachelor me different to hota hi hai
😆😆😆(joke soke)
chamak gaya sir ji
Mashallah
Kya padhata hai
Awesome 😎😎😎
C++ with DSA yha se start kr skte h direct
Great Video Sir🙏🙇♂✨💖
Awesome lecture maza aa gaya bhaiya.
you're really a great teacher
Very nice😌😌
Superb lecture! clear understanding class and objects ,funda of OOPS
Time stamps :
0:00 Introduction
1:18 Object-Oriented Programming (OOP)
13:36 OOP Implemention
17:40 Access Modifier
22:49 Class
23:52 Setter function
28:45 Getter Function
35:28 Object
43:26 Size of Class
44:05 Size of Object
45:59 Empty Class
47:45 Padding Concept
1:03:55 Dynamic Memory Allocation in OOP
Thank you
Bro can you tell me that what topics I should know before starting oops???
@@khalid6717 Basics of c++ is enough to get started rest you will learn while exploring.
nothing bro
@@khalid6717
Baapu level concept bhaiya 👍🏻
Chamka 💥💥
chamak chuka hai bhiya 🤩🤩🤩
Gazab Bhai ❤❤ ekdum pila diya hme ❤😂
Great Explanation bhaiya 😇
Today I came to know about padding for the first time.
Thank you so much bhaiya
Chamak gaya rohit bhaiya.Maja aa gaya aaj ke session me 😊😊
Memory size optimization using memory alignment 🤯🤯
Good morning bhaiya
8:24 loving to know all unknown concepts
#consistent
Maja aa Gaya bhaiya starting me todha hard laga lekin last tak sab chamak Gaya ❤️❤️
GREAT JOB YAAR
god level explanation
Chamak Gaya bhaiya ❤
Chamak gaya bhaiya💪✅
great sir thankyou so much.
mjaaa aagya bhaiya❣
amazing bhaia you are rocking ++
Nice video sir!
JAI HIND❤
ha ji bhaiya great.
Then what is the difference between struct variable and class and object
nicely explained, loved it
i loved your tecahing bhayya one day i meet bhayya
Ma apna college se oops padha per sab sar ke upar se gaya ..aapne clear kar diya oops ka concept ❤❤
First lecture of 2024 🔥
superb lecture
uncountable thanks bhaiya,,
Bro can you share me oops notes of this playlist?? I really need.
59:10 at this point. Just because of we have declared integer variable between the character variable so that's why we are facing the wastage of memory. So should we be careful while declaring the variable in the sequence ?
Sorry i have asked that question right after 59:10 but in just next bit second you answered my question.
Love you rohit bhai
Wao, very helpful
Top notch content bhiya❤
day 99/180 done .
bhaiya java ka oops ka video laye na please Rohit bhaiya mast app concept smjha deye mujhye abhi taak 15-20 video dekh chuka but smjh nhi aya but isay mujhye clear ho gye mastt bhaiya love you so much
Bhaiya in padding concept if we initialize
Char a. //1+3(padding)
Int b //4
Char c. // 1+3(padding)
Double d. //8
Then total size will be 20 na🧐🧐1:03:48
pehli bar dekha toh thoda dfficult lag raha tha, next day firse dekha toh sara doubts clear ho gaya.
first time padh rha sMAJH aajaiga ?
Baap level explaination -> Coder Army is the class of which we all are objects of or we all are objects of Coder Army Class.
Chamak gya bhaiya 😊
Oh my god I m speechless man truly amazing way of teaching 🫡
great ho sir app☺☺☺
love this
Very good explanation bhai
Chamak gya bhai ❤
Sir، pls
Data structure bhi padha dijiye
very nice
1:10:16 bhaya yaar app tho personal hogaye🥲🥲🥲🥲
What is this
It is the approach or a programming pattern where the program are structured around object
amazing
Bhaiye Chamak Chuka Hai 🙏🙏🙏🙏🙏🙏
Bhaiya apne kal gajab hi motivation diya hai ❤
Nice
In C++ why size of empty class is 1 byte?
Ans - In C++, an empty class is typically required to have a non-zero size, and the size is usually 1 byte. This is due to the standard's requirement that the size of an object must be at least 1 byte.
The reason behind this is to ensure that distinct objects in an array have unique addresses. If the size of an empty class were zero, then two adjacent objects of that class in an array would have the same memory address, violating the requirement that each object should have a unique address.
To ensure proper memory management and alignment, the C++ standard specifies a minimum size for objects, even for empty classes. Keep in mind that the actual size of an empty class may vary depending on the compiler and its settings.
chamak gya bhaiya
Day 99 ✅🔥
what is difference between structure and object, we can same things by creating struct please explain the difference?
46:27 taaki 2 object k beech mein hum unko distinguish kr sake. 1 byte space mtlb us object ko memory mein address allot hogya hai
chamak gya
Happy new year Bhai ji. It's been great learning with you ❤
iam fallen love at 32:11
is ke liye to kam se kam 4k likes bantha he