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👍
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.
Hello Rohit sir I must say you are the only one on UA-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 ❤
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.
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
@@user-lc6ee2jw6y maine Vada kiya hai to pura jarur karunga, but ab engineer bankar nahi IAS bankar, 3rd year me mujhe apne career me badlaav ka ahsas hua aur mai UPSC preparation kar raha hoon
The best playlist I found on UA-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)
Hi bhaiya I've been watching your videos since 2023 and learning a lot about DSA. But I'm a bit confused about this "learning in public" thing you and others talk about. Can you make a video explaining it? I think it would help me and others who are unsure. I get sharing web development projects, but with DSA, I'm not sure what to share. Any advice would be great! 🙏
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 ?
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.
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
Sir , i m currently pursuing my b tech from mechanical engineering, i want to do m tech in computer engineering, Am i eligible for admission through gate ??
bhaiya mujhe lagta hain ki aap thoda rest lelo aap thode thake hue lag rhe ho . bhaiya main subha 6 bje se wait kr rha tha video ka but thankyou i know it is very difficult to teach every concept in detail in a very easy way.🤘🤘🤘🤘🤘🤘
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
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 ❤
Bhai, Padding concept chamka diya behtreen... poore UA-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 💜.
I must say, this is the best DSA playlist without any doubt. Literally every concept is taught. REVOLUTION !
Baap of all lectures in yt for oops itna deep mei koi padhaya hota pura yt mei ..bhaiya salute to u
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❤
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.
Hello Rohit sir I must say you are the only one on UA-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
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 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 ☺☺
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.
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
Bhai motivation ka video next level tha Bhai 😂😂😂😂
Chalo sahi hai fr toh❣
Sir mai pahli salary aapko bhet karunga
Bhai mere ko 1k ka help krdo
Mai v
@@user-lc6ee2jw6y maine Vada kiya hai to pura jarur karunga, but ab engineer bankar nahi IAS bankar, 3rd year me mujhe apne career me badlaav ka ahsas hua aur mai UPSC preparation kar raha hoon
@@CodeWithSonu_Shark then bro placement ke time ess badlaav ko bhul mat Jana ..
😂👍@@deepanshurana5586
One of the best lecture on UA-cam
46:20 Har object ki address unique hona hai (even it is empty class), isliye 1 byte de dete hain.
The best playlist I found on UA-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)
Kya Gajab padhate ho bhaiya aap✨✨😊😊
Superb lecture! clear understanding class and objects ,funda of OOPS
Sab kuch chamak gaya Rohit Bhaiya
Baghth Badhiya concept the.
Thanks_a lot😃😃😃😃😃😃😃😃😃
is se acha OOPS ka playlist or kahi nahi milenga meri gurantee(kyuki me sari chant chuka hu)
Memory size optimization using memory alignment 🤯🤯
Sir mai roj aapki video aane ka intjaar karta hoon besabri se.
Sir hamlogo ke liye placement series bhi isi tarike se layiye
Good morning bhaiya
8:24 loving to know all unknown concepts
#consistent
Gajab bhaiya padding and alignment ke sare concept clear hogaya.
Great Video Sir🙏🙇♂✨💖
Today I came to know about padding for the first time.
Thank you so much bhaiya
sir aap bohat achhe se padhate ho,
sir Template function and class pe 1 video banao na .
Hi bhaiya I've been watching your videos since 2023 and learning a lot about DSA. But I'm a bit confused about this "learning in public" thing you and others talk about. Can you make a video explaining it? I think it would help me and others who are unsure. I get sharing web development projects, but with DSA, I'm not sure what to share. Any advice would be great! 🙏
Chalo isko address karte hai, achii baat hai
@@CoderArmy9 Thank you for your kindness and support 😇.
best padding tehnique i have ever seen
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.
This is better than any paid courses
thank you soo much sir free main itna deep kisine bhi nahi padhaya tha
Bhaiya bhot heee jayaad amazing lecture tha maja aya chamak gaya and kaafi kuch seekhne ko mila 💖
OOP lecture 1 chamak gaya ✅✅✅
waah bhaiya waah...kya makkhan tarike se samjhaya hai....❤❤
Maja aa Gaya bhaiya starting me todha hard laga lekin last tak sab chamak Gaya ❤️❤️
Baap level explaination -> Coder Army is the class of which we all are objects of or we all are objects of Coder Army Class.
Ma apna college se oops padha per sab sar ke upar se gaya ..aapne clear kar diya oops ka concept ❤❤
Gazab Bhai ❤❤ ekdum pila diya hme ❤😂
Chamak gaya bhaiya💪✅
Chamak gaya rohit bhaiya.Maja aa gaya aaj ke session me 😊😊
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
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.
Very nice😌😌
you're really a great teacher
Is there a way to print all the values of S1 without calling each and every function one at a time
Baapu level concept bhaiya 👍🏻
Awesome lecture maza aa gaya bhaiya.
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 ?
great sir thankyou so much.
ha ji bhaiya great.
day 99/180 done .
Chamak gya bhaiya 😊
amazing bhaia you are rocking ++
Day 99 ✅🔥
Koi oops ka notes bnanaya h kya??
Love you rohit bhai
Sir can you please bring a series of machine learning ? Then that will be very helpful ?
Nice video sir!
JAI HIND❤
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
First lecture of 2024 🔥
Great Explanation bhaiya 😇
nicely explained, loved it
Chamka 💥💥
Bhaiya JEE mains ka exam aaraha hai isiliye lectures nahi dekh pata but we'll continue it after exams
Int a
Char b
Char c
Also returning 8 how ? Please clear someone
Wao, very helpful
amazing
chamak chuka hai bhiya 🤩🤩🤩
iam fallen love at 32:11
is ke liye to kam se kam 4k likes bantha he
what is difference between structure and object, we can same things by creating struct please explain the difference?
chamak gaya sir ji
Sir , i m currently pursuing my b tech from mechanical engineering, i want to do m tech in computer engineering,
Am i eligible for admission through gate ??
Yes but not in every college
41K Subscribers ho gye🎉
Very good explanation bhai
love this
if without padding the complier take more time to read the data so why don't apply the padding in functional C++ ..
at 34:54 in o/p after invalid age:
Why are we getting huge int number?
Bhaiye Chamak Chuka Hai 🙏🙏🙏🙏🙏🙏
Top notch content bhiya❤
but sir we can apply conditions on functions also and we can perform same work of classes using functions so why we use classes???
Bhaiya apne kal gajab hi motivation diya hai ❤
1:10:11 i cant stop laughing
thnku so much bhaiya chamak gaya sab
Aisa kya joke maara meine😅
superb lecture
Then what is the difference between struct variable and class and object
rohit bhaiya big request please pdf provide kariye
What is this
It is the approach or a programming pattern where the program are structured around object
bhaiya mujhe lagta hain ki aap thoda rest lelo aap thode thake hue lag rhe ho . bhaiya main subha 6 bje se wait kr rha tha video ka but thankyou i know it is very difficult to teach every concept in detail in a very easy way.🤘🤘🤘🤘🤘🤘
hnjiii bhaiya ....haina
Nice
uncountable thanks bhaiya,,
Bro can you share me oops notes of this playlist?? I really need.
great ho sir app☺☺☺
sir what is the multiple of 1 and why it is taking in 8 id 57:47
Bhaiya Placement k liye OS , DBMS, COA, and CN k Preparation k liye koi Course le aao Cummunity me karenge to jaldi hojayega sabka Easily
cout
Oh my god I m speechless man truly amazing way of teaching 🫡
Can i get all oops concepts from this playlist.
Good morning Bhaiya ❤️🔥
Good Morning❣