PF Lec 57 | Difference Between Reference Variable (&) and Pointer Variable (*) | Pointers in C++

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

КОМЕНТАРІ • 8

  • @hassnain5390
    @hassnain5390 3 дні тому +1

    You are on fire. Keep on going.

  • @HaniaHani-p5e
    @HaniaHani-p5e 3 дні тому +1

    Great job Sir 💯

  • @talhanadim1847
    @talhanadim1847 3 дні тому +1

    ❤❤

  • @hamzamirani-ut9jf
    @hamzamirani-ut9jf 3 дні тому

    🎉❤

  • @ZaishaMaryam-x6q
    @ZaishaMaryam-x6q 4 дні тому

    Super ❤😊

  • @IbrahimCheema-fw4kh
    @IbrahimCheema-fw4kh 3 дні тому

    AOA sir, kia hum assay kr sktay hain
    Int a =5
    Int *ptr= &a
    Int &ref= *ptr.
    Sir will it work will ref get the value of a and then when we do this ref =20
    Will a value be changed to 20 or not.

    • @FakharStemSphere
      @FakharStemSphere  3 дні тому +1

      Obviously, it will work because pointer is pointing to variable a, a can be changed using ptr , so with ref as well. Because *ptr is nothing but a, so indirectly you are creating reference variable for a.

  • @HaniaHani-p5e
    @HaniaHani-p5e 3 дні тому +1

    Great job Sir 💯