Views : 11,140,496
Genre: Education
Date of upload: Aug 15, 2018 ^^
Rating : 4.923 (3,810/193,720 LTDR)
RYD date created : 2022-04-09T21:51:53.182746Z
See in json
Top Comments of this video!! :3
For people still confused on Pointers, I thought of a little analogy:
Say your friend wants to know where you live. Think of your hometown as memory, with lots of houses being stored (variables), and addresses to locate them (pointers). You wouldn't show your friend, say, a picture of your house and expect them to find it quickly. Therefore, you would give your friend your house's address (a pointer), so they can locate it easily.
Now, let's put it to proper terms.
C wants to know what the variable you're referring to is. You have memory, with lots of variables being stored, and addresses to locate them. You can't give C your variable name and expect C to find it amongst all of your other variables, so you refer to its address as a pointer so C can easily locate it.
Hope this helped :)
Edit: thanks for all the love this comment got <3. realised this isnt the most technical analogy (wrote it when i was 15, im nearly 18 now 😅) so to further it:
showing your friend a picture of your house, as opposed to the address is analogous to showing C a variable name (which it sees as the variable's value) as opposed to the variable address (a pointer).
5.7K |
I am 51 year old woman, who studied computer science at school. I really loved it, but then I got a rubbish computer science teacher and destroyed my love of the subject. I am now studying your course because I want to become a computer programmer. Thankyou for not putting ads in and for being an amazing, to the point, no waffle teacher. Honestly you are a good man and are truly inspiring people of all ages, sexes and nation xxxxx
2.5K |
1:03:30
If you're using the code runner in VS Code and you're not getting the output you want, it's because you have to run the code in the Terminal instead of the Output. Go to Settings (Ctrl + ,), then search for "code runner", then turn on Code-runner: Run In Terminal.
93 |
This is a GREAT tutorial and you are a GREAT instructor!!! Everything was so clearly explained. I love that you differentiated the "i" and "j" variables used simply as counters in many "for loops" and the "i" and "j" variables that are used to reference array index locations in nested "for loops". I've been through so many courses where this goes unmentioned and creates so much unnecessary confusion. Many thanks to you for making this course!!!
10 |
@freecodecamp
4 years ago
Click the "JOIN" button below the video to support freecodecamp.org/!
1.4K |