Structure Pointer and Arrow Operator | C Language Tutorial

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

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

  • @yourfriend9222
    @yourfriend9222 2 года назад +21

    I had seen videos ranging upto 1 hour to understand stucture pointer and arrow operator , your 8:39 minutes were the ones to explain....... Thanks a lot........

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

      Glad my video helped you
      Keep learning

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

    Pointer to Struct is actuakky a fairly complicated topic. But your simplistic way of explanation made it pretty simple. Thx a lot.

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

    Very simple explanation. Thanks brother.

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

    Thanks for the video. Helped a lot in understanding about this operator.

  • @karthikeyan8752
    @karthikeyan8752 2 года назад +4

    These Tutorials are so Efficient 😀😀😀😀

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

    That was a pleasure to listen to. Thank you. Made it very clear and simple to understand. Great work!!

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

    Thanks a lot. explained so easily with simple examples, perfect!

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

    thank you very much I was looking for this arrow operator . you earned my sub

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

    Thanks for sharing, you video teachs me a lots.

  • @MohdWaris-ue6hy
    @MohdWaris-ue6hy 2 года назад +1

    Why are you saying to dislike come on man no one can dislike it was the perfect explainationnn thankssss dudeee!!

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

      Thank you
      Just wanted to get some genuine opinion

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

    Thank you, very well explained!

  • @jimmyshmurda7814
    @jimmyshmurda7814 4 года назад +6

    excellent tutorial.

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

    Hi, Nicely explained. Thanks a lot. I have a question. How does pointer to a class or a struct works ? I mean, I know that a pointer to a string is the address of the first character and computer can read the continuous memory blocks until it finds the null character. So how does this works in the case of a class pointer or a struct pointer ?

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

    thank you sir

  • @9a56mahabirjaiswal9
    @9a56mahabirjaiswal9 3 года назад

    Crystal clear explanation

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

    thankyou sir very clear explanation! -new subscriber :)

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

    Thank you so much, sir 😊.

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

    Means --> arrow operator and (*__). Member both are for same use right ?

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

    awesome tutorial

  • @AjayKumar-qy9il
    @AjayKumar-qy9il 3 года назад +1

    You are really great

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

    Sir so there is no difference between -> and * atall? They both have the exact same purpose.. ?

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

      There is no difference between -> and (*__). You need the star AND dot (don't forget the parenthesis) if you decided not to use the -> operator

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

    Can we change the name "Anil" like
    ptr->name="Name";
    or it is an error;

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

      here "name" is the name of the character array.
      array name is a constant pointer.
      once it points to a memory address, we cant change it.
      it will always point to that memory address.
      if you write
      ptr -> name="Anil"
      you are actually trying to store the address of character A in the pointer "name"
      which is not possible because it is a constant pointer.
      So we use strcpy function to change the value stored in the memory location pointed by "name"
      hope this helps :)
      -learninglad

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

      @@joeyyeet2970 thanks u cleared my doubt

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

    Thank you.

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

    Thank a lot for your great tutorial

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

    Thanks a lot sir

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

    Instead of age if we apply operations on name it gets error lvalue required

  • @debjitdatta6901
    @debjitdatta6901 4 года назад +2

    ptr -> age = 200 works but why ptr -> name = AnilD ; doesn't work ?? We can change int value but not string .. how to change that ?

    • @LearningLad
      @LearningLad  4 года назад +2

      here "name" is the name of the character array.
      array name is a constant pointer.
      once it points to a memory address, we cant change it.
      it will always point to that memory address.
      if you write
      ptr -> name="Anil"
      you are actually trying to store the address of character A in the pointer "name"
      which is not possible because it is a constant pointer.
      So we use strcpy function to change the value stored in the memory location pointed by "name"
      hope this helps :)

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

      @@LearningLad thank you very much

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

    Which IDE you are using?

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

    Which compiler do you use sir?

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

    Thank u so much

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

    thanks

  • @randoms39
    @randoms39 4 года назад +2

    What if we use
    Void main()
    Instead of,
    Int main()

    • @Miles-co5xm
      @Miles-co5xm 3 года назад +1

      cpp requires it , c doesnt , it indicates sucefull compilation

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

      should return 0

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

    The reason why I watched this video is
    Because of thumbnail.
    I was wondering about => operator
    But it wasn't there
    Is it a clickbait? 🤔

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

      Or by mistake?

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

      yes it was a mistake
      it should be -> operator
      sorry about that
      i made thumbnail 2 days after the video.
      really sorry

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

    Thank you anil shetty

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

    whatever anything I do or did or anything or before or after

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

      or did not watch the previous about you know what I mean but I know it from I will keep it secret

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

      whatever anything I do or did or anything

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

    666th like🤗

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

    Ok im not interested in C programing rather than cpp but i just came hoping for 1st comment haha

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

      what you get if u commented first

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

      @@LearningLad Dont be angry sorry..i was not angry i was just telling that i hoped for first comment

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

      I'm not angry bro.
      some people just open the video hit like then comment and leave.
      they don't watch the video or that topic is not at all needed for them.
      I just don't think the comments like "the first comment, first like" etc add any value.

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

      @@LearningLad Sorry...im learning cpp from you and ur tutorials are the best on youtube becuz u go prom beginner to advanced...I didnt think of learning c becuause maybe i thought it is an old programming language but u would be happy to see people commenting

    • @LearningLad
      @LearningLad  4 года назад +2

      I just love to see people commenting on my videos. But not the comments like " First view, First Like, First Comment " etc
      Anyways thank you for chatting about this. Have a great day :)