Lecture 70: Object Oriented Programming in C++

Поділитися
Вставка
  • Опубліковано 7 вер 2024

КОМЕНТАРІ • 241

  • @CoderArmy9
    @CoderArmy9  8 місяців тому +101

    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

    • @machinecode2.047
      @machinecode2.047 8 місяців тому +1

      Sir tree kab start hoga bahat time hogaya he

    • @manishsati-wv8xz
      @manishsati-wv8xz 8 місяців тому +1

      Bhaiya maja aagya sach mein, kaafi kuch new sekha

    • @CodeWithSonu_Shark
      @CodeWithSonu_Shark 8 місяців тому +1

      Placement series bhaiya please
      I'm your biggest fan

    • @CodeWithSonu_Shark
      @CodeWithSonu_Shark 8 місяців тому

      Placement series bhaiya please
      I'm your biggest fan

    • @CodeWithSonu_Shark
      @CodeWithSonu_Shark 8 місяців тому

      Placement series bhaiya please
      I'm your biggest fan

  • @relaxingtime2411
    @relaxingtime2411 8 місяців тому +62

    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👍

    • @mmangalmusic
      @mmangalmusic 2 місяці тому

      Thankyou for this kindly information ❤

  • @divyanshsharma673
    @divyanshsharma673 6 місяців тому +15

    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 💜.

  • @karthikhkamath
    @karthikhkamath 7 місяців тому +14

    I must say, this is the best DSA playlist without any doubt. Literally every concept is taught. REVOLUTION !

  • @Sam-gx9xl
    @Sam-gx9xl 6 місяців тому +9

    Baap of all lectures in yt for oops itna deep mei koi padhaya hota pura yt mei ..bhaiya salute to u

  • @manishsati-wv8xz
    @manishsati-wv8xz 8 місяців тому +24

    Rohit Bhaiya aap jis tarike se padate ho, wo unique hai, seedha ratana start ni karte baaki bebbar bhaiya, shurdha didi ki tarha

    • @kakshihatake
      @kakshihatake 6 місяців тому

      Obhi acha hi padata hain BC

    • @thorff7423
      @thorff7423 3 місяці тому +1

      bhai tune kintne lecture kar liye hai

    • @eduTech45
      @eduTech45 3 місяці тому

      you are absolute right!

  • @nikkisharma-ps2su
    @nikkisharma-ps2su 7 місяців тому +8

    All the future Aspirant, Mein aapko bolna chahungi, ye Best Series hai OOPS ki, first time I have really Understood it, Thanks bhaiya❤

  • @anushkasoni7071
    @anushkasoni7071 8 місяців тому +4

    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.

  • @alpanachoubey3386
    @alpanachoubey3386 4 місяці тому +1

    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

    • @CoderArmy9
      @CoderArmy9  4 місяці тому

      Welcome ❤️

    • @jarvis6325
      @jarvis6325 4 місяці тому

      iam fallen love at 32:11
      is ke liye to kam se kam 4k likes bantha he

  • @bharatmalik2756
    @bharatmalik2756 8 місяців тому +1

    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 ❤

  • @zafrul_islam
    @zafrul_islam 8 місяців тому +1

    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 ☺☺

  • @sayyedtaimoorshah6345
    @sayyedtaimoorshah6345 4 місяці тому +1

    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.

  • @Ravi-wn4pe
    @Ravi-wn4pe 8 місяців тому +14

    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

    • @CoderArmy9
      @CoderArmy9  8 місяців тому +7

      Thank you

    • @khalid6717
      @khalid6717 6 місяців тому

      Bro can you tell me that what topics I should know before starting oops???

    • @Ravi-wn4pe
      @Ravi-wn4pe 6 місяців тому

      @@khalid6717 Basics of c++ is enough to get started rest you will learn while exploring.

    • @Rithik_purohit
      @Rithik_purohit 6 місяців тому

      nothing bro
      @@khalid6717

  • @zishanchaudhary2636
    @zishanchaudhary2636 8 місяців тому +5

    Bhai motivation ka video next level tha Bhai 😂😂😂😂

    • @CoderArmy9
      @CoderArmy9  8 місяців тому +1

      Chalo sahi hai fr toh❣

  • @CodeWithSonu_Shark
    @CodeWithSonu_Shark 8 місяців тому +67

    Sir mai pahli salary aapko bhet karunga

    • @rameshsinghno-po546
      @rameshsinghno-po546 Місяць тому +1

      Bhai mere ko 1k ka help krdo

    • @user-lc6ee2jw6y
      @user-lc6ee2jw6y 22 дні тому +1

      Mai v

    • @CodeWithSonu_Shark
      @CodeWithSonu_Shark 22 дні тому +1

      @@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

    • @deepanshurana5586
      @deepanshurana5586 22 дні тому +2

      ​@@CodeWithSonu_Shark then bro placement ke time ess badlaav ko bhul mat Jana ..

    • @raihanzakariya
      @raihanzakariya 9 днів тому

      😂👍​@@deepanshurana5586

  • @navneetsharma6191
    @navneetsharma6191 Місяць тому +1

    One of the best lecture on UA-cam

  • @joydeep-halder
    @joydeep-halder 8 місяців тому +2

    46:20 Har object ki address unique hona hai (even it is empty class), isliye 1 byte de dete hain.

  • @Hackthic
    @Hackthic 2 місяці тому

    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)

  • @ManKR
    @ManKR 3 місяці тому +1

    Kya Gajab padhate ho bhaiya aap✨✨😊😊

  • @yerramarun2K05
    @yerramarun2K05 8 місяців тому +2

    Superb lecture! clear understanding class and objects ,funda of OOPS

  • @sagar00121
    @sagar00121 6 місяців тому

    Sab kuch chamak gaya Rohit Bhaiya
    Baghth Badhiya concept the.
    Thanks_a lot😃😃😃😃😃😃😃😃😃

  • @mohit6215
    @mohit6215 5 місяців тому +2

    is se acha OOPS ka playlist or kahi nahi milenga meri gurantee(kyuki me sari chant chuka hu)

  • @joydeep-halder
    @joydeep-halder 8 місяців тому +2

    Memory size optimization using memory alignment 🤯🤯

  • @CodeWithSonu_Shark
    @CodeWithSonu_Shark 8 місяців тому +1

    Sir mai roj aapki video aane ka intjaar karta hoon besabri se.
    Sir hamlogo ke liye placement series bhi isi tarike se layiye

  • @tanujtanmaypattnaik2897
    @tanujtanmaypattnaik2897 8 місяців тому +1

    Good morning bhaiya
    8:24 loving to know all unknown concepts
    #consistent

  • @LaksyayKhanna
    @LaksyayKhanna 2 місяці тому

    Gajab bhaiya padding and alignment ke sare concept clear hogaya.

  • @_hulk748
    @_hulk748 6 місяців тому +1

    Great Video Sir🙏🙇‍♂✨💖

  • @sonalirawat3731
    @sonalirawat3731 8 місяців тому

    Today I came to know about padding for the first time.
    Thank you so much bhaiya

  • @prasaddeshmukh9322
    @prasaddeshmukh9322 6 місяців тому +1

    sir aap bohat achhe se padhate ho,
    sir Template function and class pe 1 video banao na .

  • @kakshihatake
    @kakshihatake 8 місяців тому +7

    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! 🙏

    • @CoderArmy9
      @CoderArmy9  8 місяців тому +5

      Chalo isko address karte hai, achii baat hai

    • @kakshihatake
      @kakshihatake 8 місяців тому

      @@CoderArmy9 Thank you for your kindness and support 😇.

  • @punitsharma584
    @punitsharma584 2 місяці тому

    best padding tehnique i have ever seen

  • @gauravsinghjethuri5405
    @gauravsinghjethuri5405 7 місяців тому +1

    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 ?

    • @gauravsinghjethuri5405
      @gauravsinghjethuri5405 7 місяців тому

      Sorry i have asked that question right after 59:10 but in just next bit second you answered my question.

  • @literallyme893
    @literallyme893 3 місяці тому

    This is better than any paid courses

  • @jeebanchoudhury
    @jeebanchoudhury 15 днів тому

    thank you soo much sir free main itna deep kisine bhi nahi padhaya tha

  • @shubhamkumarjha9192
    @shubhamkumarjha9192 8 місяців тому

    Bhaiya bhot heee jayaad amazing lecture tha maja aya chamak gaya and kaafi kuch seekhne ko mila 💖

  • @rhitam_biswas
    @rhitam_biswas Місяць тому

    OOP lecture 1 chamak gaya ✅✅✅

  • @AkashSingh-ow2el
    @AkashSingh-ow2el 6 місяців тому

    waah bhaiya waah...kya makkhan tarike se samjhaya hai....❤❤

  • @SiyaRamSiyaRam1008
    @SiyaRamSiyaRam1008 5 місяців тому

    Maja aa Gaya bhaiya starting me todha hard laga lekin last tak sab chamak Gaya ❤️❤️

  • @GitHubNotes
    @GitHubNotes 6 місяців тому

    Baap level explaination -> Coder Army is the class of which we all are objects of or we all are objects of Coder Army Class.

  • @kimjongun9681
    @kimjongun9681 3 місяці тому

    Ma apna college se oops padha per sab sar ke upar se gaya ..aapne clear kar diya oops ka concept ❤❤

  • @saurabhkumarsrivastava6034
    @saurabhkumarsrivastava6034 26 днів тому

    Gazab Bhai ❤❤ ekdum pila diya hme ❤😂

  • @prakashshah7129
    @prakashshah7129 4 місяці тому +1

    Chamak gaya bhaiya💪✅

  • @adarshthakur_etah_up
    @adarshthakur_etah_up 8 місяців тому

    Chamak gaya rohit bhaiya.Maja aa gaya aaj ke session me 😊😊

  • @maniishbhandari
    @maniishbhandari 8 місяців тому

    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

  • @abhinayjangde
    @abhinayjangde 8 місяців тому

    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.

  • @priyanshigupta2228
    @priyanshigupta2228 6 місяців тому +1

    Very nice😌😌

  • @awanishpatel3393
    @awanishpatel3393 5 місяців тому

    you're really a great teacher

  • @SHIPRASINGH-t9r
    @SHIPRASINGH-t9r 15 днів тому

    Is there a way to print all the values of S1 without calling each and every function one at a time

  • @heetpatel3037
    @heetpatel3037 4 місяці тому

    Baapu level concept bhaiya 👍🏻

  • @actualsatan2420
    @actualsatan2420 7 місяців тому

    Awesome lecture maza aa gaya bhaiya.

  • @manassingha8493
    @manassingha8493 4 місяці тому

    pehli bar dekha toh thoda dfficult lag raha tha, next day firse dekha toh sara doubts clear ho gaya.

  • @alexjaiswal1
    @alexjaiswal1 2 місяці тому

    great sir thankyou so much.

  • @yaserkhan5955
    @yaserkhan5955 17 днів тому

    ha ji bhaiya great.

  • @Coder-rohits
    @Coder-rohits 7 місяців тому +2

    day 99/180 done .

  • @lonersunited
    @lonersunited 9 днів тому

    Chamak gya bhaiya 😊

  • @SmritiSharma-vv7ib
    @SmritiSharma-vv7ib Місяць тому

    amazing bhaia you are rocking ++

  • @itshirdeshk
    @itshirdeshk 8 місяців тому +3

    Day 99 ✅🔥

  • @AnujKumar-ip8kq
    @AnujKumar-ip8kq 3 місяці тому +1

    Koi oops ka notes bnanaya h kya??

  • @anshror2583
    @anshror2583 8 місяців тому +1

    Love you rohit bhai

  • @rohitgupta3305
    @rohitgupta3305 8 місяців тому +1

    Sir can you please bring a series of machine learning ? Then that will be very helpful ?

  • @checkthisout1718
    @checkthisout1718 2 місяці тому

    Nice video sir!
    JAI HIND❤

  • @RohanSingh-nf7wk
    @RohanSingh-nf7wk 2 місяці тому

    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

  • @Aryan-wl7mc
    @Aryan-wl7mc 8 місяців тому

    First lecture of 2024 🔥

  • @user-mi6el1vs2l
    @user-mi6el1vs2l 3 місяці тому

    Great Explanation bhaiya 😇

  • @gautamv8112
    @gautamv8112 2 місяці тому

    nicely explained, loved it

  • @abytespaceneeded
    @abytespaceneeded 6 місяців тому +1

    Chamka 💥💥

  • @sumitvishwakarma1075
    @sumitvishwakarma1075 8 місяців тому +1

    Bhaiya JEE mains ka exam aaraha hai isiliye lectures nahi dekh pata but we'll continue it after exams

  • @anushka_katiyar_9
    @anushka_katiyar_9 Місяць тому

    Int a
    Char b
    Char c
    Also returning 8 how ? Please clear someone

  • @ColorsInUniverse
    @ColorsInUniverse 5 місяців тому

    Wao, very helpful

  • @souvikrouth1583
    @souvikrouth1583 13 днів тому

    amazing

  • @anchitroy5469
    @anchitroy5469 6 місяців тому

    chamak chuka hai bhiya 🤩🤩🤩

  • @jarvis6325
    @jarvis6325 4 місяці тому

    iam fallen love at 32:11
    is ke liye to kam se kam 4k likes bantha he

  • @miteshrajpurohit9033
    @miteshrajpurohit9033 7 місяців тому

    what is difference between structure and object, we can same things by creating struct please explain the difference?

  • @RahulGupta-wv7lv
    @RahulGupta-wv7lv 6 місяців тому

    chamak gaya sir ji

  • @vishesh_lamba
    @vishesh_lamba 8 місяців тому +3

    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 ??

    • @CoderArmy9
      @CoderArmy9  8 місяців тому +2

      Yes but not in every college

  • @samarthtare3745
    @samarthtare3745 8 місяців тому +1

    41K Subscribers ho gye🎉

  • @deepsanyal2
    @deepsanyal2 8 місяців тому

    Very good explanation bhai

  • @SahajjotSingh-rh3nw
    @SahajjotSingh-rh3nw Місяць тому

    love this

  • @vaishalichoudhary5
    @vaishalichoudhary5 7 місяців тому

    if without padding the complier take more time to read the data so why don't apply the padding in functional C++ ..

  • @mdsarupalimondal2578
    @mdsarupalimondal2578 8 місяців тому +1

    at 34:54 in o/p after invalid age:
    Why are we getting huge int number?

  • @AmitThakur-py6bs
    @AmitThakur-py6bs 8 місяців тому +1

    Bhaiye Chamak Chuka Hai 🙏🙏🙏🙏🙏🙏

  • @prathmesh_Bidve
    @prathmesh_Bidve 8 місяців тому

    Top notch content bhiya❤

  • @vaishalichoudhary5
    @vaishalichoudhary5 7 місяців тому

    but sir we can apply conditions on functions also and we can perform same work of classes using functions so why we use classes???

  • @pranildhutraj6038
    @pranildhutraj6038 8 місяців тому

    Bhaiya apne kal gajab hi motivation diya hai ❤

  • @DEEPJAIN_
    @DEEPJAIN_ Місяць тому

    1:10:11 i cant stop laughing
    thnku so much bhaiya chamak gaya sab

    • @CoderArmy9
      @CoderArmy9  Місяць тому

      Aisa kya joke maara meine😅

  • @user-wy9sk8qw9w
    @user-wy9sk8qw9w Місяць тому

    superb lecture

  • @xd....yt89
    @xd....yt89 3 місяці тому

    Then what is the difference between struct variable and class and object

  • @user-gc4vs7wp6j
    @user-gc4vs7wp6j 8 місяців тому +1

    rohit bhaiya big request please pdf provide kariye

  • @Ajkr2
    @Ajkr2 3 місяці тому

    What is this
    It is the approach or a programming pattern where the program are structured around object

  • @lkboss2642
    @lkboss2642 8 місяців тому

    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.🤘🤘🤘🤘🤘🤘

  • @vanshchauhan3111
    @vanshchauhan3111 7 днів тому

    hnjiii bhaiya ....haina

  • @PPP-7061
    @PPP-7061 5 місяців тому +1

    Nice

  • @user-ey9ey9jx9s
    @user-ey9ey9jx9s 3 місяці тому

    uncountable thanks bhaiya,,

    • @NamanRanaOfficial
      @NamanRanaOfficial Місяць тому

      Bro can you share me oops notes of this playlist?? I really need.

  • @PayalDhiman-rp3ob
    @PayalDhiman-rp3ob 6 місяців тому

    great ho sir app☺☺☺

  • @dibbodas4116
    @dibbodas4116 4 місяці тому

    sir what is the multiple of 1 and why it is taking in 8 id 57:47

  • @deep_singh01
    @deep_singh01 8 місяців тому

    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

  • @Roshan__3006
    @Roshan__3006 3 місяці тому

    cout

  • @Dump104
    @Dump104 Місяць тому

    Oh my god I m speechless man truly amazing way of teaching 🫡

  • @123subha
    @123subha Місяць тому

    Can i get all oops concepts from this playlist.

  • @amankumaramar271
    @amankumaramar271 8 місяців тому +1

    Good morning Bhaiya ❤️‍🔥