Working with pointers

Sdílet
Vložit
  • čas přidán 23. 07. 2024
  • See complete series on pointers here • Pointers in C/C++
    In this lesson, we will see some code snippets, and try to understand how to work with pointers in C or C++.
    Watch the previous lesson "Introduction to pointers" for basics.
    • Introduction to pointe...
    For practice problems and more, visit: www.mycodeschool.com
    Like us on Facebook: / mycodeschool
    Follow us on twitter: / mycodeschool

Komentáře • 415

  • @ChristianAbbott2
    @ChristianAbbott2 Před 9 lety +527

    These explanations are excellent, you're putting my professors to shame

  • @otownsend7819
    @otownsend7819 Před 8 lety +211

    You taught this concept better than how it was taught in Harvard's introduction to computer science class! thank you :)

  • @Fadin19
    @Fadin19 Před 10 lety +48

    This is not "Playing with Pointers" like you said, this is an excellent in depth explanation on C Pointers.
    Thank you so much!

  • @garryharry1024
    @garryharry1024 Před 9 lety +15

    Hey you are seriously gifted man... I honestly wish I was paying you my tuition and not my school. Like the other comment said you are putting my professors to shame. Keep what you are doing man... you are great at it.

  • @DGuttyC
    @DGuttyC Před 8 lety +1

    Thank you so much! Being a non-computer science major, I've been studying programming myself and the concept of pointer has been one of the toughest to grasp. Now it makes more sense :)

  • @prathampaila3026
    @prathampaila3026 Před 7 lety +1

    There is no any other better explanations regarding pointers in youtube. Perfectly teaching with clear examples.

  • @RamytRamyt
    @RamytRamyt Před 5 lety +3

    Your videos are SO much clearer than the explanations our professor gives. Thank you so much!

  • @pappeepow8985
    @pappeepow8985 Před 7 lety +2

    This vid saved me from failing C programming, you sir is amazing.
    You explain 100x better than my professor. so thanks a lot!

  • @shivamverma9447
    @shivamverma9447 Před 3 lety +10

    These lectures are pure GOLD. Best lectures ever uploaded on CZcams. HatsOFF man........ :)

  • @geneon7924
    @geneon7924 Před 7 lety +13

    Short and concise, you my friend are legendary at teaching C.

  • @shrey15
    @shrey15 Před 7 lety +3

    Man, you're an amazing teacher. I was fed up at college when i wasn't able to understand anything about pointers and your videos helped me immensely to get those stuff. Keep up the good work man. Hats off to you!

    • @whyDude123
      @whyDude123 Před rokem +1

      hey Shreyansh, i just wanna what are you doing now... ( about your job.. )

  • @mboerrigter1
    @mboerrigter1 Před 9 lety +2

    Explained clearly and concisely. Brilliant work on the whole series.

  • @grandtheftautosanan1
    @grandtheftautosanan1 Před 8 lety +37

    Thank u for your simple english and great explaination!

  • @prajeshrajsingh998
    @prajeshrajsingh998 Před 4 lety

    The way you spent tym in making these videos as well as those captions(subtitles), is just great. Thank you so much for spending time and making our future bright.

  • @devanshrajoria5418
    @devanshrajoria5418 Před 7 lety

    You rocks mycodeschool. Its so fun and easy to do programming with your tutorials.

  • @surajsharma939
    @surajsharma939 Před 3 lety +3

    your legacy will always there ,miss u harsha sir

  • @sowmiya77
    @sowmiya77 Před 7 lety +7

    Oh My God! After watching this video my thought on pointers concept is totally changed as an easy concept. Perfect Explanation which I never heard before !!!!! :-) Thanks a lot

  • @zachsmith1423
    @zachsmith1423 Před 7 lety +11

    you sir deserve an award....thank you very much!

  • @pawzillasmash
    @pawzillasmash Před 6 lety

    man you're very clear about the explanation which my prof couldn't do over the course of 2 classes. Thanks a bunch! Saved me from understanding the material.

  • @Kashif_Javaid
    @Kashif_Javaid Před 11 lety +2

    Best pointer tutorials in CZcams, keep up the good work

  • @ozzyfromspace
    @ozzyfromspace Před 5 lety +1

    You're a legend bro! I hated dealing with pointers before coming across your playlist, now they seem sensible. Thank you so much! You have brought me joy, and I look forward to making it to your data structures playlist. Best wishes, and I'm excited to see what comes next with this series on pointers.

  • @bryanp.6255
    @bryanp.6255 Před 8 lety +2

    Perfect examples! I learned a lot. Thank you.

  • @mingx009
    @mingx009 Před 10 lety +1

    Thanks a lot. The lesson is so much detail and step-by-step. Great.

  • @tejaskiranm4021
    @tejaskiranm4021 Před 7 lety +3

    beautiful explanation , I was struggling to understand b4 watching Ur videos , u have made illustrated it in a very simple manner, tq .

  • @wenjiecheng1391
    @wenjiecheng1391 Před 7 lety +4

    Damn this is the greatest tutorial I have ever seen!!! Thank you.

  • @gulnarismaylzad4429
    @gulnarismaylzad4429 Před 4 lety

    thanks to your contribution to understanding basic logic in C programming. it is really easy to understand clearly.

  • @sandagomithilakarathne7222

    Small add up to the course:
    if you are trying to compile these codes from a linux terminal, you might get an error saying " expects argument type int ". its because ,when you try to get the memory address by printf, you cannot specify it as %d as its shown in the video.
    instead of that try to put %p.
    example:
    printf("%d
    ", *p); // this might works fine since the out put is an integer as its expected.
    but to get the address.
    printf("%p
    ", p); //this works for the address

  • @mattshu
    @mattshu Před 6 lety +1

    I can't believe I can spend so long confused by pointers and I come across these videos and it all clicks together. Thank you! (Also wonderful accent, it's like the diet version :))

  • @keremoflu
    @keremoflu Před 10 lety +1

    It was very helpful and professionally ! Thanks for your efforts.

  • @manilmasd6902
    @manilmasd6902 Před 9 lety +5

    Thank you for all your hard work professor :)

  • @arjitjain9406
    @arjitjain9406 Před 4 lety

    Excellent Explaination , You cleared almost every doubt anyone can have with such ease , just Mind Blowing

  • @GeorgeRodes1968
    @GeorgeRodes1968 Před 8 lety +4

    Excellent work! Much appreciated.

  • @kavan1773
    @kavan1773 Před 8 lety

    Your explanations are very easy to understand. Thanks a bunch! I just subscribed!

  • @abhishekvarma9235
    @abhishekvarma9235 Před 8 lety +1

    Thank u sir u have made my concepts so clear may God bless ur soul...

  • @jasmine9538
    @jasmine9538 Před 7 lety +5

    Can't believe I actually understand this! Thanks

  • @willmorgan8830
    @willmorgan8830 Před 5 lety

    Excellent teacher. Your videos are pure gold. Thank you ...!

  • @Sarahhh123
    @Sarahhh123 Před 3 lety

    you´re honestly the best account, thank you so much!!!

  • @i_write7500
    @i_write7500 Před rokem

    Yaar this is THE SIMPLEST EXPLAINATION I have seen.Thank you sooo much dude!!

  • @TheKaveshan
    @TheKaveshan Před 8 lety

    THNAK YOU SO MUCH FOR THESE VIDEOS...FAR BETTER THAN UTILISING MY PRESCRIBED TEXTBOOK. YOU REALLY DONT KNOW HOW MUCH IT IS APPRECIATED. THANK YOU

  • @evergreendon6469
    @evergreendon6469 Před 4 lety

    The best explanation I have ever ever seen all my life, thumbs up ~!

  • @fandiks
    @fandiks Před 6 lety +1

    Thanks a lot for making all of these videos! You"re great explaner :)

  • @rishirajrao5337
    @rishirajrao5337 Před 9 lety

    these are really incridble videos.these videos are what i m seeking for..thanks for your work..these are helpful .

  • @mudzi9433
    @mudzi9433 Před 7 lety +3

    Thank you so much for these videos! They are really great :)

  • @yashpandey9550
    @yashpandey9550 Před 8 lety +5

    when you were explaining , you used a statement like "ADDRESS OF P".....But when we are using a pointer P, we are actually referring to the address of integer variable A rather than the address of integer to pointer P...To refer to the address of P we must use another pointer to integer (Cuz P is also a pointer of type integer or a pointer to integer) and we will store the address of pointer variable P in this variable..... :D By the way , your videos are really brilliant , the best i have seen so far ! Thanks :)

  • @Shadow-lx9rh
    @Shadow-lx9rh Před 3 lety +1

    Sir really i thank you very much from the core of my heart. Please make more videos on other topics of programming .

  • @linxrayan6309
    @linxrayan6309 Před 7 lety +3

    Salam alykom
    I find your lessons simple and clear
    thank you

  • @andrewcarrillo4814
    @andrewcarrillo4814 Před 3 lety

    Im in my first semester of grad school and taking an intro to C programming class. The professor ruined this concept by not explaining it well and glossing over it. I’ve been struggling with these for 4 weeks and I’m so glad I found these explanations. Everything is coming together in my brain

  • @anondoggo
    @anondoggo Před 5 lety

    Omg. That is so fascinating. I am enthralled by pointers now.

  • @jyotirmoymondal7640
    @jyotirmoymondal7640 Před 8 lety +3

    Thank you for all your hard work professor ,i think you are the next steve jobs....

  • @pttgolden701
    @pttgolden701 Před 3 měsíci

    Your videos are cool bro. Although from ten years ago but they can help me get more knowledge for programing

  • @WilsenLie
    @WilsenLie Před 10 lety

    Fixed it.. Dude, u are awesome. Your videos help me to understand about pointers.

  • @alessandralucena5228
    @alessandralucena5228 Před rokem

    mano, ninguém supera a didática desse cara!!

  • @TenshiSkies
    @TenshiSkies Před 3 lety

    You are an excellent teacher!

  • @mohanaddarwish2307
    @mohanaddarwish2307 Před 8 lety

    Dude, i love your videos and i want to tell u i hope u get the same help u r proving us in ur advanced career topics by other cool guys like yourself:))

  • @NeerajSharma-oz1mm
    @NeerajSharma-oz1mm Před 4 lety +2

    Sir, first of all - hats off
    You’re doing an amazing job. There is one correction however, sizeof is not a function, it’s an operator which is executed at compile time.

  • @ayazaslam6167
    @ayazaslam6167 Před 5 lety

    u r great.born to teach and learn new things. at 7:45 u cleared my confusion.
    thanks a lot.

  • @MohitK96
    @MohitK96 Před 8 lety

    your teachings are directly attacking my mind;)Gr8 Work

  • @djravish4920
    @djravish4920 Před 7 lety +1

    i really appreciate you man ! excellent explanation !

  • @HaniYahya9
    @HaniYahya9 Před 11 lety

    You really made it so clear, thank you!

  • @rztutul8824
    @rztutul8824 Před 7 lety +2

    Thanks a lot ...
    i learn so much from this video

  • @cindycruz2010
    @cindycruz2010 Před 9 lety +1

    Thank you for the videos. Your explanations make pointers much easier to understand. I have a question, though. Why use pointers to manipulate the int value. Wouldn't it be easier to just change the value directly. I guess I thought pointers were used to copy the integer value so it could be manipulated without changing the original variable value.

  • @rshparmar4962
    @rshparmar4962 Před 4 lety +3

    May God Bless your Soul RIP brother. You are missed a lot!!!

  • @GustavoCosta-jr1mh
    @GustavoCosta-jr1mh Před 3 lety

    Great video, man. Thank you!

  • @showwavemaharjan3517
    @showwavemaharjan3517 Před 5 lety +1

    You sir just made my day.
    Thank you for your contribution. I hope I could repay you some day.

  • @5857612
    @5857612 Před 11 lety

    You explain and teach well. Lucky I found this vid.

  • @nisargparab8074
    @nisargparab8074 Před 4 lety

    Next level explanation....Thanks very much...

  • @ThePomelo09
    @ThePomelo09 Před 8 lety

    You are the best!! ty!! from Argentina!

  • @Smartboynikso
    @Smartboynikso Před 11 lety

    I have joined NIIT for c language but i couldn't get this level of explanation.
    very gud explanation
    Awesome work thanq :)

  • @SuhailAmeen46
    @SuhailAmeen46 Před 10 lety

    love this guys explanation

  • @aashiqahmed5273
    @aashiqahmed5273 Před 2 lety

    Nice to revisit these old videos

  • @rshparmar4962
    @rshparmar4962 Před 4 lety

    If he would have been alive the whole programming would have been a lot easy with these awesome explanations.

  • @tepy3506
    @tepy3506 Před 3 lety

    Thank you for your clear explanation.

  • @alexbravo7467
    @alexbravo7467 Před 3 lety

    Excellent Explanation , dear friend , Thank you very much for sharing ...

  • @vjlau02
    @vjlau02 Před 11 lety

    Thank you so much for the lesson !! Things are clear now ! :)

  • @imamhossain8621
    @imamhossain8621 Před 9 lety +1

    Good job bro....really helpfull.

  • @puterich
    @puterich Před 5 lety

    very good series!

  • @abanerjee3704
    @abanerjee3704 Před 3 lety

    That's hell lot of a job brother, well done.

  • @symbols1984
    @symbols1984 Před 9 lety +1

    Thanks for your very helpful videos

  • @poojapawar8162
    @poojapawar8162 Před 3 lety

    Thank you so much, I was so confused you have solved my all doubts

  • @amineziani5546
    @amineziani5546 Před 3 lety

    excellent explanations!

  • @ericsimaginaryfriend
    @ericsimaginaryfriend Před 4 lety

    bless your ultrawide videos

  • @josejimenez850
    @josejimenez850 Před 7 lety

    Wow. I did not know you can initialize the "*p" to the address. My book always did the long way. Now I understand how you can pass addresses through the parameter of other functions. Wow thank you for clearing that up. I was getting confused because I thought "*p" only contained a number at which "p" had the address of. But now I see that *p is to tell the c system the the variable p is a pointer!! And omg it makes so much sense

    • @josejimenez850
      @josejimenez850 Před 7 lety

      Correct me if I'm wrong!! Please I love to learn my own misconceptions

  • @srivanikothavadla4606
    @srivanikothavadla4606 Před 4 lety

    Thanks alot to mycodeschool

  • @alexsece
    @alexsece Před 7 lety +4

    Thank you very much for the explanation!
    Tip: sound level is very low.

  • @carlitodidthat
    @carlitodidthat Před 3 lety

    Best explanation on youtube

  • @elescoces33
    @elescoces33 Před 7 lety

    Wow! Amazing class :)

  • @satyendrasingh-oh7mp
    @satyendrasingh-oh7mp Před 8 lety

    what a explanations..excellent ..sir..

  • @CrashingJawls
    @CrashingJawls Před 7 lety

    Great lessons!

  • @leixun
    @leixun Před 4 lety +6

    *My takeaways:*
    *& vs *:*
    int a=10; \\ declare a variable
    int *p; \\ create a pointer, and we have to initialise it otherwise we will have an error
    p = &a; \\ initialise the pointer 'p' with the memory address of 'a' (i.e. &a)
    int *p = &a; \\ we can also create a pointer and initialise it in one line of code
    int* p = &a; \\ this does the same as the above code
    *Be aware when we are not creating a pointer, 'p' is the pointer (i.e. the memory address) and '*p' is the value at the memory address pointed by 'p'.*
    For example:
    '*p' is the value at the memory address of 'a' (i.e. '&a')
    =the value of 'a'
    =10
    *p = 12; \\ this is called dereferencing, we can change the value of 'a' to 12 using the pointer
    *Index memory*
    p is the memory address of 'a'
    p+1 is the memory address of 'a' + the size of 'int' (i.e. 4 bytes), and if 'a' is in other data types, the size is different

    • @RM-lb7xw
      @RM-lb7xw Před 3 lety +1

      Isn't *p = 12 called dereferencing? That is, changing the value at a position using pointers?

    • @leixun
      @leixun Před 3 lety +1

      @@RM-lb7xw You are right, fixed.

    • @whyDude123
      @whyDude123 Před rokem

      i was struggling with this but i found your comment after figuring out by myself 🥲🥲

  • @hugo.teixeira
    @hugo.teixeira Před 9 lety

    Great videos!

  • @yz4440
    @yz4440 Před 8 lety

    Really good video,thanks a lot!

  • @cesarsc971
    @cesarsc971 Před 11 lety

    Very very good teacher. Thanks

  • @enkhnyambattulga9351
    @enkhnyambattulga9351 Před 3 lety

    wow
    you are an excellent teacher

  • @heckreg199
    @heckreg199 Před 8 lety

    Great work sir!

  • @rahulshree2441
    @rahulshree2441 Před 6 lety

    now i get it....u explained this soo well

  • @monicatentu6802
    @monicatentu6802 Před 10 lety +1

    great.....!! thank you so much for all the videos....can u plz upload the videos of java nd c++ too...

  • @MrARIFHAIDER
    @MrARIFHAIDER Před 10 lety

    Bhai,you are awesome.Thanks a lot........

  • @JohananJoysingh
    @JohananJoysingh Před 8 lety +4

    You sound like Dhoni... :D .. Good Explanations :)

  • @latishpatil5171
    @latishpatil5171 Před 6 lety

    tysm for di video bcoz of u I understand pointer perfectly

  • @zjinia
    @zjinia Před 11 lety +1

    thanks :) it helps me to clear the concept :) :)