Structures, Unions & Enums in C++ | C++ Tutorials for Beginners #14

Поделиться
HTML-код
  • Опубликовано: 17 янв 2025

Комментарии • 728

  • @Vv_cherry
    @Vv_cherry 4 года назад +202

    idk why? You make such good content and people enjoy the free stuff without even hitting the like
    is that so hard.
    I feel sorry man....
    btw awesome content. nowhere to find such good ones

    • @mayankbaber9384
      @mayankbaber9384 3 года назад +4

      gazab ki baat ye hai ki there are some ppl who have disliked this video...

    • @cs29harshazad22
      @cs29harshazad22 3 года назад +5

      i dont know about others but i smash like at the time of clicking the video

    • @vikramdongare9717
      @vikramdongare9717 3 года назад +4

      @@cs29harshazad22 me also bro

    • @Lack_Of_Enemies
      @Lack_Of_Enemies Год назад +1

      @@cs29harshazad22 usss

    • @i_h_ishan
      @i_h_ishan 7 месяцев назад

      pura dekte vi ho kya?

  • @heeru379
    @heeru379 3 года назад +19

    Esa lag rha hain Jese Harry bhai ne yhe course C sikh kr aye logo ke liye banaya hain. Kyunki Harry bhai ne C language ke course me ekdam detail me padhaya hain. Lekin C++ course me Harry bhai ne jaldi jaldi padha diya.

    • @kushal6065
      @kushal6065 3 года назад +4

      ha exactly. SO I learnt structure,union and enumeration from another channel completely and easily

    • @thearyan_bgmi3400
      @thearyan_bgmi3400 4 месяца назад

      ​@@kushal6065which one?

  • @mayukhmandal4920
    @mayukhmandal4920 3 года назад +130

    Harry Bhaiya, I just got to know that you are an alumnus of IIT Kharagpur and I am also a 3rd-year undergraduate student of the metallurgy dep at IIT Kgp. As you know, Our placements are knocking at the door, so I came into your channel since I had a very poor interest in coding. But now, I am bound to do it for the placement purpose and tbh you have instilled the motivation for coding into me by creating such amazing programming language tutorial videos through your youtube channel and that too for free of cost. I will forever be indebted to you, bhaiya. Thank you so much

    • @ahwabanmukherjee5065
      @ahwabanmukherjee5065 2 года назад +6

      Hello! I'm a fresher of EECE Dual this year :) Very excited to go to the campus

    • @pushparghyamullick3792
      @pushparghyamullick3792 2 года назад +1

      @@ahwabanmukherjee5065 Me too :-)

    • @deceptivedawwg1111
      @deceptivedawwg1111 2 года назад +11

      I'm a freshie at NIT ROURKELA CSE :)
      IIT ni to NIT hi shi :)

    • @tarun22428
      @tarun22428 2 года назад

      @@deceptivedawwg1111

    • @vanshikarathi2356
      @vanshikarathi2356 Год назад +2

      hey ....since i also started learing c++in my 3rd year...i was curious to know if you got the placement.(i am worried that i started a little late , that's why i was asking)

  • @sksadiruddin4191
    @sksadiruddin4191 3 года назад +130

    11:52 , it is not garbage value , but it is the ASCII code of 'c' i.e. 99 , if we use 'd' then it will show 100

  • @SubhamKumar-9009
    @SubhamKumar-9009 4 года назад +113

    🔴 5:49🔴All Shubhams unite😂😂
    Big fan harry bhai💛❤️

  • @scoc55vora15
    @scoc55vora15 3 года назад +8

    16:00 Very Much Detailed Pinpoint and in depth Analysis of Enum by 0 & 1 Test

  • @arshadmapari9500
    @arshadmapari9500 3 года назад +76

    Thanks bhai, best explanations!
    TIP : Enum is short for enumerate, meaning to allot a number. Another way to understand enums :D

    • @adityagurjar3371
      @adityagurjar3371 Год назад +1

      what is the use to enumerate

    • @arshadmapari9500
      @arshadmapari9500 Год назад +2

      @@adityagurjar3371 You can allot a number to (enumerate) each item to make it easy to access

  • @Web47
    @Web47 5 лет назад +16

    You are a person that regular or alternate day upload your videos ..You are doing very well..great job bro

  • @PsychologyRemix
    @PsychologyRemix 3 года назад +142

    harry.salary = 1200000...( thode or laga lete hain) 🤣🤣
    👍👍

    • @tushargogiya4017
      @tushargogiya4017 3 года назад +1

      abhi km h

    • @reverbism
      @reverbism 3 года назад +3

      same yhi dakh ky comment krny aia tha lol

    • @nikhilrawat3959
      @nikhilrawat3959 3 года назад +11

      Km hai mere liye fir bhi koi baat nhi chla lenge Ghar 😂😂 nice Harry sir. 👍

    • @hemangkrish0734
      @hemangkrish0734 3 года назад

      @@nikhilrawat3959 me @12000 ,gazzab bezzati hai

  • @ankitjainhere
    @ankitjainhere 3 года назад +51

    at 14:27 this is not any bug in code runner extension, it's a feature that you can run partial code. When you select some code in the editor and run it using code runner extension the selected part of the code gets executed. You can turn off this feature in the settings.

  • @AnEngineerHuman
    @AnEngineerHuman 2 года назад +17

    Day-10
    completed upto Tutorial-14
    Date-12/12/2022
    Time-22:32
    Topic-Structur_Union_And_Enums
    thank you harry bhai

  • @flashbhaskar
    @flashbhaskar 4 года назад +126

    Very good video, one correction -- 12:00 - the "99" what you are getting is the ASCII value of "C" as the value is overwritten. It is not a garbage value... very minor correction :)

    • @gauravmak2394
      @gauravmak2394 3 года назад +3

      rice is there in cout then howcome 99 or the ascii value of car is appearing even it wins

    • @ashutoshyadav9382
      @ashutoshyadav9382 3 года назад +11

      @@gauravmak2394 the value "c" is assigned to rice as harry says but as the DATA TYPE of rice is "int" so it will give the ASCII value of "c".
      if u want to check change the DATA TYPE of rice to "char". it will give you "c" as output....

    • @ashutoshyadav9382
      @ashutoshyadav9382 3 года назад +2

      RIGHT........

    • @thesmartone6601
      @thesmartone6601 2 года назад +1

      @@ashutoshyadav9382 But the value 'c' was assigned to car , then how come on printing rice we are getting ASCII value of 'c'?

    • @brahmarajrathod3091
      @brahmarajrathod3091 2 года назад +1

      @@thesmartone6601 because the data is saved in same space those 4 bytes are interpreted in different way for union this way it saves space

  • @KrishnaJaiswal-xs2jd
    @KrishnaJaiswal-xs2jd 4 года назад +25

    Your explanation style is really great and your sound always seems familiar.
    Thanks for making our path easier.

  • @dank_raider
    @dank_raider 4 года назад +92

    3:14 , 120000000 months jo kam hai mere liye fir bhi kam chala lenge 🤣🤣

    • @GaneshKumar-qs9kn
      @GaneshKumar-qs9kn 4 года назад +8

      Kam isliye hai kionki usme tax bhi bharna prega n....

    • @ankitkushwaha633
      @ankitkushwaha633 3 года назад +2

      @@GaneshKumar-qs9kn kitna bhi bharna pade 6 clole milenge na

    • @GaneshKumar-qs9kn
      @GaneshKumar-qs9kn 3 года назад +1

      @@ankitkushwaha633 haa haa bilkul milenge bs hr mahine koi bank ya fir kisi bahut Amir aadmi Ko lut lo...
      Fir 6 crore nhi blki 15-20 crore milenge

    • @nirajsingh7086
      @nirajsingh7086 3 года назад +2

      @@ankitkushwaha633Toh fir toh haary ko hi lutna padega

    • @5minSci
      @5minSci 3 года назад

      @@GaneshKumar-qs9kn 😂😂😂😂😂😂😂😂😂😂😂

  • @Sousa2255
    @Sousa2255 2 года назад +2

    5:52 Shubham is none other than our legendary "BEAST BOY SHUB"

  • @AmanRaj-nn6xx
    @AmanRaj-nn6xx 5 лет назад +29

    Sir,first of all thank you for providing us your lectures for free,it's been really helpful for students like us.I had a small query about the books or online platform to practice questions on python along with your videos as I want to learn python to an expert level but confused from where to practice the questions with goes along with your video tutorials,Thank you.

  • @shubhamsaini4871
    @shubhamsaini4871 2 года назад +2

    5:51
    Harry bhaiya, Mai hu shubham.
    😄😄😄

  • @thedragonsgaming5858
    @thedragonsgaming5858 2 года назад +3

    12:00 Its not a garbage value the newly declared variable overrides previous variable's memory location hence it converts to int ascii 'c'=99.

  • @siddharthkandhway7950
    @siddharthkandhway7950 4 года назад +11

    At 11:46 , that is not a garbage value. In unions memory locations are shared among many variable and at a time only one of the variable can be accessed. When you defined the character 'c' as the newest variable then, it will show correct output for car, but when you output rice which is actually an integer, then it (character c) will be type converted to an integer(with the help of ASCII values).

    • @rupeshyadav2097
      @rupeshyadav2097 3 года назад

      Wahi to bola ki overwrite hojati hai uski value😶

  • @AbcD-ju9un
    @AbcD-ju9un 2 месяца назад

    JazakAllah sir and family team Ameen.

  • @sayakmondal4610
    @sayakmondal4610 2 года назад +3

    14:25 Here you're running the code by selecting some code that's why it is giving error I think it is not an code runner error. Thanks❤.

  • @bhuwanmalik2034
    @bhuwanmalik2034 4 года назад +9

    I am really learnt from this lecture

  • @gouravmishra9803
    @gouravmishra9803 4 года назад +24

    3:15 ... 🤑 per month aur kaya chaiye

    • @GaneshKumar-qs9kn
      @GaneshKumar-qs9kn 4 года назад +2

      120000000 rest after paying tax😁😁😁😁

  • @baklolyou8571
    @baklolyou8571 4 месяца назад +1

    Harry bhai at 12:06 i think garbage value nhi dega instead jo var dusra define hoga uski value dega bcz jb mene run krke dekha to uski hi value aari thi.Aapki garbage value isslie aari thi bcz aapne char lia tha !!!!.hope that helps for future learners .#happylearning

  • @shashikantkumar-pz4jv
    @shashikantkumar-pz4jv 4 года назад +7

    very nicely explained all the concepts. love you bro. keep teaching us.

  • @thug_meme3160
    @thug_meme3160 4 года назад +1

    Bhai ae video me etna maza aya ki mene apni comedy videos ki list me dal diya or jab bhi mood kharab hota he me ye video dekh leta hu bhai
    Bhai aap bahot hi acha kam kar rahe ho

  • @akshayagnihotri
    @akshayagnihotri 4 года назад +431

    harry sir , I noticed one thing in yourr most of the videos ,you always used a name rohandas , who is rohan das, can u pls explain 😁😁

    • @Kdaddyis
      @Kdaddyis 3 года назад +83

      Bachpan ke langotiya yaar hai...

    • @bibekray5874
      @bibekray5874 3 года назад +69

      Rohan das mere coaching ka topper tha
      Abhi IIT kgp mai hai😂

    • @Kdaddyis
      @Kdaddyis 3 года назад +14

      @@bibekray5874 Kia tumlog jante ho... Harry bhai ka Asli nam.....?

    • @SSCO-DANISHAHMEDWALIULLAHSIDDI
      @SSCO-DANISHAHMEDWALIULLAHSIDDI 3 года назад +6

      @Rajat Nahata sach me ? 😳😳😳

    • @wwefans1587
      @wwefans1587 3 года назад +1

      🆂︎🅰︎🅷︎🅸︎ 🅷︎🅰︎🅸︎ 🅼︎🅰︎🅸︎🅽︎🅴︎ 🅱︎🅷︎🅸︎ 🅳︎🅴︎🅺︎🅷︎🅰︎ 🅷︎🅰︎🅸︎🤔🤔🤔🤔🤔🤔

  • @codewithanuj1762
    @codewithanuj1762 3 года назад +31

    Hi Harry highly appreciated, I am from Los Angeles and your tutorial helped me crack the interview at apple. I learned C++ in 2 hours. Class and pointers that all they asked. By the it will be very helpful if you can create tutorial on bubble sorting, swapping, Fibonacci, algorithms for an interview it will be great help. In all the interviews in USA all tech companies they ask, Array, Arranging, Descending, Fibonacci, Bubble Sorting, Swapping algorithms that it.

    • @aryan7069_
      @aryan7069_ 3 года назад +3

      you understood hindi ? nice

    • @vaibhav7457
      @vaibhav7457 3 года назад +4

      really they asked you array , bubble sorting Fibonacci , swapping . I studied this in school.

  • @rushabhnagda9267
    @rushabhnagda9267 3 года назад +2

    bhai thank you so much, because of your easy method of explanation i am able to understand c++ and apply it in the college syabus, once again thankyou and love your work and tutorials keep it up man

  • @darshansuryawanshi5549
    @darshansuryawanshi5549 4 месяца назад

    06:14 use of typedef in cpp

  • @ShubhamTiwari-ng7sp
    @ShubhamTiwari-ng7sp 3 года назад +1

    5:56 mai bhi hu shubham , bhaiya aapka dost. thank you for this course.

  • @kumarshubham4327
    @kumarshubham4327 2 года назад +1

    5:48 Yes it indeed a common name .In my batch there are three Shubham including me.

  • @zainuldin9095
    @zainuldin9095 4 года назад +7

    sir your teaching method is too good .but ,please give easy examples which we can understand or life friendly.

  • @chavanram5649
    @chavanram5649 3 года назад +1

    Thanks sir for free provide lucture c++🙏🙏🙏🙏🙏

  • @sumitnayak2436
    @sumitnayak2436 3 года назад

    Watch 3.03 to 3.16 🤩💥 kya bol diye sir

  • @ali_editc
    @ali_editc Год назад

    A noob code:
    #include
    using namespace std;
    int main ()
    {
    int i;
    int marks[4]= {28,30,35,48};
    do{
    cout

  • @shubham-m8z
    @shubham-m8z 2 года назад +2

    thanks bhaiya I'm shubham jaiswal🙂🙂🙂🙂

  • @Shubhams_Globe_Trek
    @Shubhams_Globe_Trek 4 года назад +11

    Im very happy 😌 when you take variable names or employees name Shubham. In c language course also there is Shubham Shubham 🤭 and hear also Shubham

    • @Shubh_X_Trend001
      @Shubh_X_Trend001 3 года назад +1

      Bhai mera name bhi shubham I'm very happy kii. Harry bhai in variables mein shubham name Ke rhe hai.aisa LG rhaa ki real mein Harry bhai. Mujhe pdaa rhe ho ki shubham aisa Kr vaisa krrr. Mujhe boht Acha lgta haiii. Keep it sirr. We lv u sirr. ❤️❤️❤️❤️❤️❤️❤️ May God Bless uuuuuu

  • @ianiketjain
    @ianiketjain 3 года назад +1

    Outstanding bhai harry 🤘✌✌✌

  • @Shubh_X_Trend001
    @Shubh_X_Trend001 3 года назад

    Harry.sir zindaaabaad ❤️❤️🎊🎊🎊

  • @UECAshutoshKumar
    @UECAshutoshKumar 2 года назад +1

    Thank you bhaiya ❤️

  • @rishikeshthakur6497
    @rishikeshthakur6497 4 года назад +5

    Thank you sir for providing such a great lecture. Hat's off you

  • @shubhupote3915
    @shubhupote3915 4 года назад +48

    My name is Shubham
    Name common
    Personality unique🤣🤣

  • @nothuman9450
    @nothuman9450 4 года назад +1

    12:30 ,enum

  • @MShahmeer-x4e
    @MShahmeer-x4e Год назад

    Harry Bhai app bohat acha Kam kr rahy han ❤

  • @Vaishalichadhari7512
    @Vaishalichadhari7512 4 года назад +4

    5:53 I M Shubham😌🙌

  • @r_nikhil_kumar
    @r_nikhil_kumar 2 года назад +6

    11:50 it wasn't garbage value, it was ASCII code of 'c' bcz rice variable is of integer datatype

    • @taimoorgamerz1560
      @taimoorgamerz1560 2 года назад

      No that was char Data type check again

    • @r_nikhil_kumar
      @r_nikhil_kumar 2 года назад

      @@taimoorgamerz1560 you should recheck brother, rice is an integer type variable

  • @Xamji-ge3qm
    @Xamji-ge3qm 2 года назад +1

    Thanks Harry , now I can easily play with structures.. 😇

  • @shalauddinyousuf9655
    @shalauddinyousuf9655 11 месяцев назад +1

    Harry Bhai is best

  • @subhamadhikari2445
    @subhamadhikari2445 Год назад

    5:50, Subham at your service 😉😊

  • @Khadijah_Shabir
    @Khadijah_Shabir 11 месяцев назад

    Amazing ...Finally I got this concept

  • @himanshusingh2585
    @himanshusingh2585 3 года назад +1

    3:11 harry sir aap 12000000 v jada earn kroge kaun kaun agree krta hai ❤️❤️❤️

  • @ShubhamKumar-du9mz
    @ShubhamKumar-du9mz 3 года назад +1

    Mera v naam le liya harry bhai ne dil khush ho gya😂

  • @ombhandwaldar8304
    @ombhandwaldar8304 Год назад

    Your explanation is too good👍

  • @amritanshtewari1574
    @amritanshtewari1574 3 года назад +1

    7:13 important type def

  • @abheygupta2332
    @abheygupta2332 4 года назад +13

    14:30 sir vo error isliye aaya tha cuz you ran a program after selecting some portion

  • @singingcomparison9255
    @singingcomparison9255 3 года назад

    11:50 it is nor garbage or random number. If you notice, the 99 is the acci code of 'c'

  • @rajanjain1979
    @rajanjain1979 3 года назад +7

    in the structure variable the total size wont be 9 byte, it will be 12 because of structure padding.

  • @akhandjeet6114
    @akhandjeet6114 Год назад +2

    Sir pura bounce ho gya.....

  • @Aditya-kumar-129
    @Aditya-kumar-129 3 года назад +1

    @CodeWithHarry not sure but at 11:45 when we run the program it doesn't give the garbage value but it gives the ascii value of 'c'.

  • @sanjanatyagi3603
    @sanjanatyagi3603 3 года назад +1

    I love his videos , i m blessed that i could find this channel awesome teaching i love it these videos are helping me to prepare for my placememts n the best part is that i m enjoying watching his videos n yeah after all it is free so thats the best part n i recomment you all to watch all his tutorials i m currently watching web development n c++ and from my personal experience as i have tried other platforms also but i found this the best among all ❤️❤️❤️❤️

  • @aihmad3133
    @aihmad3133 4 года назад

    Nicely Explained ....From Pakistan

  • @deltaR711
    @deltaR711 2 года назад

    Thank you, for good explanation. However, at 11:50 of video, the output value is not a garbage, it's the ASCII value of letter 'c'.

  • @apurvasonawane5049
    @apurvasonawane5049 3 года назад +1

    Thank you!!

  • @arneshguru4263
    @arneshguru4263 3 года назад +1

    every video of yours deserves a like.
    🙂

  • @ShubhamKumar-et7gx
    @ShubhamKumar-et7gx 3 года назад +1

    asli shubham.... hey! harry bhai milta hu apse chai pr....

  • @Ashish_Kumar_Sharma
    @Ashish_Kumar_Sharma Год назад

    Around 12:00 ,while explaining union, the value of 'c' (99) is not garbange but ANSCII

  • @vlogsbyusmannn
    @vlogsbyusmannn Год назад

    or ma UNI jata hu BSCS krny kuch pallay ni prta to apka lecture dekhta hu sb smjh a jati ha Love from Pakistan ❤

  • @aryan7069_
    @aryan7069_ 3 года назад +1

    Music in end gives me different vibe :)

  • @rajanijaiswal333
    @rajanijaiswal333 5 лет назад +3

    Thank u harry bhai
    please bring exercise fast

  • @MEHAKFATIMANAQVI
    @MEHAKFATIMANAQVI 6 месяцев назад

    you covered important topics very fast

  • @BG-lj6fw
    @BG-lj6fw 3 года назад

    0:38 ......harry sir proving his memory ...too funny :-))

  • @gayatriagharde6829
    @gayatriagharde6829 2 года назад

    Harry sir , your video clear concept and understanding point and helpful video...thank U so much

  • @atulverma3424
    @atulverma3424 Год назад

    thank you sir..... thak you so much .... sir

  • @rm3569
    @rm3569 4 года назад +8

    If notes are available then upload in this series
    Your notes are very helpful

  • @a_12_nileshchaudhari14
    @a_12_nileshchaudhari14 3 года назад

    U r the best harry

  • @mohinishendye1040
    @mohinishendye1040 3 года назад +1

    Great!!!❤️❤️🙏

  • @MizukoPlayz
    @MizukoPlayz 2 года назад

    thank you harry bro this video is verry helpfull

  • @royfamily9273
    @royfamily9273 3 года назад

    Thanks Harry Bhaiya

  • @V1N4Y457
    @V1N4Y457 Год назад

    11:01 12 bytes will be allocated to structure not 9
    Bytes due to padding

  • @AM-wk5ei
    @AM-wk5ei Год назад

    Thanks I know hindi now apart from c++

  • @motivationalquotes_19
    @motivationalquotes_19 2 года назад

    Thanks sir i love your videos so much

  • @srijansoni6972
    @srijansoni6972 3 года назад

    Completed ✅😊

  • @mahiiidddd
    @mahiiidddd Год назад

    Love you Harry Bhai from Macload gunj

  • @drashysesodia512
    @drashysesodia512 3 года назад +1

    Thank q bhaiya

  • @kashifchawla1
    @kashifchawla1 3 года назад

    thnanks harry bhai this video is very useful

  • @harshalmali856
    @harshalmali856 2 года назад

    very nicee video sir .

  • @MuneebaMushtaq-jq3pt
    @MuneebaMushtaq-jq3pt 2 года назад

    thanks🤗

  • @factzandcode
    @factzandcode 2 года назад

    harry vai, in child hood: e code runner ki galti he😂😂( after getting error while running code)
    harry vai, future me🤠: code ko select karke mat run karo, ek tempcoderunner file generate ho jayega, or select kiya hua part hi run hoga😎

  • @anonymousperson793
    @anonymousperson793 2 года назад +1

    5th October ✅

  • @mayankbaber9384
    @mayankbaber9384 3 года назад +3

    awesome video... but how to implement these concepts?

  • @079shubham_sain3
    @079shubham_sain3 3 года назад

    yesss.............bro my name is shubham😍😍😍

  • @rajeshingale3497
    @rajeshingale3497 2 года назад

    Thanks for videos harry sir ,
    & My name also shubham

  • @zaidansari7335
    @zaidansari7335 2 года назад +5

    Thanks!

  • @ashitranjan3971
    @ashitranjan3971 Год назад

    Enjoying the tutorial

  • @vivekshah2569
    @vivekshah2569 3 года назад

    THANK YOU HARRY BHAI

  • @vinayakbhargava8614
    @vinayakbhargava8614 3 года назад

    @codewithharry You are awesome

  • @shubhamkhetan02
    @shubhamkhetan02 4 года назад +7

    5:51 Yup its me

  • @SrinjoyPramanik1174
    @SrinjoyPramanik1174 8 месяцев назад +1

    That 99 is not a garbage value. That is the ASCII value of 'c'.

  • @merazahmad55
    @merazahmad55 5 лет назад +6

    Python series me ajj Maine health management ka project comment kiye hai check pls and reply