No video

21:Everything u need 2 know about pointers -Richard Buckland

  Рет қаралды 536,987

UNSW eLearning

UNSW eLearning

Күн бұрын

(*but were afraid to ask)
Review of pointers and indirect addressing. pass by reference/pass by value. Passing arrays into functions.
3 neat things you can do with pointers:
1. pass by ref
2. dynamic data structures (to come)
3. ADTs in c (to come)
the exponential growth of doubling revisited.
magic trick where you are offered a choice - VS the importance of a good spec.
Starting to design a suduko solver. Mars bars from Hong Kong.

Пікірлер: 494
@CASMANWHAT
@CASMANWHAT 8 жыл бұрын
i like this teacher's passion. helps learning.
@ladywebber1726
@ladywebber1726 3 жыл бұрын
i finally get pointers
@raminmdn
@raminmdn 8 жыл бұрын
This last hour watching this video was the best hour of education I had in years ! Although I previously knew about pointers, I didn't miss a second.
@PapaWilk
@PapaWilk 9 жыл бұрын
This lecture makes me unbelievably happy. Richard's explanation of pointers is simply brilliant. He then performs some hilarious magic tricks and even rewards his students with 256 Mars bars. This is amazing!
@supaponhia6864
@supaponhia6864 9 жыл бұрын
You are the best professor in the WORLD. Thank you for sharing video on youtube.
@richy2496
@richy2496 4 жыл бұрын
This guy really knows how to teach. Out of all the videos I've watched about pointers, this one clarified the concept at a fundamental level.
@Winged4Ever
@Winged4Ever 10 жыл бұрын
Totally gonna watch his lectures instead of ones that I can listen on my university, cause this guy's explaination skill rocks!
@s3bbe1337
@s3bbe1337 10 жыл бұрын
I wish my professor was this enthusiastic!
@VahiMangai
@VahiMangai 4 жыл бұрын
Hope he hasn’t started another sars equivalent Hunh, how uh, serendipitous
@vineethk8516
@vineethk8516 4 жыл бұрын
Watching this video in quarantine
@coreydevs
@coreydevs 2 жыл бұрын
Joke didn’t age well
@Klassenfeind
@Klassenfeind 8 жыл бұрын
note to self: x is actually )( and & is actually 8
@aya6816
@aya6816 7 жыл бұрын
or gamma
@3333218
@3333218 10 жыл бұрын
Finally understood pointers !! Best lecture ever. Truly educational.
@ChaosRevealsOrder
@ChaosRevealsOrder 8 жыл бұрын
WILLIAM such a good question 17:45 . I was searching for hours on internet WHY,WHY,WHY should we use pointers instead of normal variables. Mr.Richard is an amazing teacher
@c99tutorial
@c99tutorial 10 жыл бұрын
Jump to 4:18 to go right to the pointer discussion.
@aryamankarde473
@aryamankarde473 Жыл бұрын
Nothing between these walls ever leaves this walls, loved your confidence sir.
@big_lawyer
@big_lawyer Жыл бұрын
For those here in 2023, hit the like button😅😅😅... I totally love this Professor's passion. He made Pointers absolutely look easy peasy. Thank you Professor Richard
@justcurious1940
@justcurious1940 Жыл бұрын
why lawyers learn C🙃
@big_lawyer
@big_lawyer Жыл бұрын
@@justcurious1940 because lawyers have to know a bit of everything 😂😂😂
@justcurious1940
@justcurious1940 Жыл бұрын
@@big_lawyer make sense
@mdmjwarner
@mdmjwarner 12 жыл бұрын
Wow, months of studying c and c++ = 0 understanding of pointers. 48 minutes of this guys lecture and I can use them with ease.
@isaackay5887
@isaackay5887 4 жыл бұрын
LMAO at that joke @0:58....watching this in mid-March of 2020 XD
@justcurious1940
@justcurious1940 Жыл бұрын
Cables ?
@krissapkota715
@krissapkota715 12 жыл бұрын
ur awsome..non of my teachers are like u..they never teach us like this...they just gives me power point slides and say me to do everything...this is very helpful to me...thank u so much..
@Ashokgadeking
@Ashokgadeking 8 жыл бұрын
A simple explanation of pointers. int* creates a pointer variable which can store the address of another integer. if we say int* a, a is now ready store the address of int b. To get the address of variable b, we say &b. So now we can say a = &b; . We should also remember that a also has an address and can be referred to by saying &a. *a returns the value stored at the address stored in a. That is b. Lol!
@Ashokgadeking
@Ashokgadeking 7 жыл бұрын
I have not touched java in a while. a should return the address and *a should give the value stored at that address if my understanding of pointers is still intact.
@rishabhjain2404
@rishabhjain2404 7 жыл бұрын
thanks for the explaination.. this was the only thing missing in the lecture
@YoVille451
@YoVille451 5 жыл бұрын
That is &b *
@medievalogic
@medievalogic 10 жыл бұрын
The quality of teaching is just insane, everything is so clear, i wish all of the colleges in India would teach this way :/
@vedranart
@vedranart 11 жыл бұрын
Oh darn, when I see proffessors like this Im sad that theres not more of them like this one, great study, fun explaining of things, and compairing things from everyday use with virtual things. That was a nice hour of great education!
@paulmaxwell-walters8861
@paulmaxwell-walters8861 5 жыл бұрын
Had the pleasure of meeting and attending lectures by Richard Buckland at UNSW. He is a legend and a brilliant, well loved lecturer. An asset to the university.
@Gelar93
@Gelar93 9 жыл бұрын
Wow this guy is genuinely interested in teaching, he was so good that I, who has a hard time focusing in a real class, sat in front of my laptop and watched it all in one setting with focus. Wish more professors were like him.
@benjamenhartley8658
@benjamenhartley8658 9 жыл бұрын
didn't know John Green knew so much about programming. Cool guy!
@filosofiadetalhista
@filosofiadetalhista 4 жыл бұрын
The same comparison crossed my mind! Hahaha
@jethrobailey8358
@jethrobailey8358 9 жыл бұрын
this guy is a top class lecturer!
@vitamink3
@vitamink3 6 жыл бұрын
Incredible! I spent last few days trying to understand pointers and this video explained it so beautifully. He not only explained what pointers are but also why do we need it.
@anttihaapala4579
@anttihaapala4579 5 жыл бұрын
"In other languages, [scoffs] you write like this: p1 is a pointer to int, but in C we write it like this: star-p is an int." Brilliant!
@SedaNurDoganay
@SedaNurDoganay 8 жыл бұрын
can't unsee the John Green in you :D Thank you so much for your clear expression of the pointers and thank you for your great passion!
@Bikaln
@Bikaln 11 жыл бұрын
Just loved it...understood every bit of pointers..undoubtedly the best professor ever. Please don't stop the good work and keep on uploading his lectures..we'd be really grateful to you!!
@FrankBudino
@FrankBudino Ай бұрын
Amazing lecturer, some people are born to be teachers
@HK-sw3vi
@HK-sw3vi 3 жыл бұрын
this teacher is a gifted one.
@AndroidOO3
@AndroidOO3 10 жыл бұрын
Like the fifth video I've looked up, this one has taught me everything i could want to know at this stage and more. This guy 's a great teacher!
@bako3178
@bako3178 7 жыл бұрын
Wow. I've been looking everywhere for a good pointer (pun intended) to pointers, and this by far has to be the best. Cleared up everything I was unsure of. Amazing lecturer!
@LCaaroe
@LCaaroe 13 жыл бұрын
Holy shit this is useful. I wish my teachers were as engaged in the subject as this guy is.
@theyugesh388
@theyugesh388 8 жыл бұрын
what a lecture!!!!!!!! SO MUCH DEDICATED IN THEIR WORK HOPE U KEEP UP THE GOOD JOB:)
@s.d.gentry1354
@s.d.gentry1354 8 жыл бұрын
one of the best explanations I have seen about pointers to pointers (the crazy exam question example).
@shadyganem5448
@shadyganem5448 3 жыл бұрын
"Hopefully I didn't start a SARS equivalent " lol
@mirlamontano6640
@mirlamontano6640 8 жыл бұрын
I finally understood how can I use pointers, great lesson! (also, the teacher is so sweet c: doing magic tricks and bringing presents hahaha aww) thanks for uploading this!
@zerox227x
@zerox227x 10 жыл бұрын
ok i'l admit i thought i was done for in coding C. discourage and unmotivated because no one could really teach me well and i tried all sorts of tricks and tips to help me learn so i wouldn't be a burden to anyone, but after seeing this vid about 1 to 2 hr later i fully understand the subject that cause me to drop my class because it was too heavy in use. now im confident that i will ace my class up coming semester thank you his teaching style make you understand it perfectly.
@steveokinevo
@steveokinevo 10 жыл бұрын
More teachers like this guy needed for sure. Things get complicated when ya look at stuff like int **p1 / array of pointers / pointer to an array of x / function pointers, etc... list goes on.
@xanderlewis
@xanderlewis 6 ай бұрын
14:53 This example is enlightening. Thinking about it will teach you a bit about how C compilers usually work. They usually have a notion of 'lvalues' (expressions that can appear on the left hand side of the assignment operator) and 'rvalues' (expressions that can't). In his example (&&&***x), we'd have to assume that x is at least an n-fold pointer (so that we can dereference it at least three times). We can then apply the reference (&) operator once to get the address of this value, but the second use of & is where it already goes wrong. At that point, we're trying to get the address of an rvalue - something that doesn't live at a memory address, but is just an expression floating around ready to be used. If you try it in C, it won't even compile. He suggests trying the other way around (***&&&x), but this has the same problem at the second use of &. One way to do something that WILL work is to try declaring x and then successively declaring pointers to x, pointers to this pointer, and so on. If you do this, you can successfully dereference the final pointer three times to get back x. TLDR: any occurrence of '&&' is going to fail.
@jaken82
@jaken82 7 жыл бұрын
I love this guy's passion and energy. I have been trying to get my head around pointers for ages and just avoided them. Now I understand!
@kennethafstedt6231
@kennethafstedt6231 8 жыл бұрын
Just great, it's a pity that my teacher wasn't anything close to this.
@rohitmundada703
@rohitmundada703 7 жыл бұрын
Wow.... That's a beautiful lecture that surely removed all my doubts about pointer... And the guy makes things quite simple and easier to understand... Great job Sir...
@_slier
@_slier 14 жыл бұрын
actually pointers is easy.. what make its hard is,ppl always wonder why we learn it thank you richard for clearing this up basically pointers are use to overcoming scoping limitation
@Vishanseru9
@Vishanseru9 12 жыл бұрын
Now those are the kind of teachers we need!
@intindse
@intindse 14 жыл бұрын
Richard is the BEST TEACHER EVAR!
@francoc3495
@francoc3495 6 жыл бұрын
I wish I had him as a professor. This one video has helped me understand pointers than prior professors or textbooks.
@TheIndividualOne
@TheIndividualOne 11 жыл бұрын
Amazing professor, crystal clear explanation! Kinda looks like wilson from house
@MrCavitysChessCorner
@MrCavitysChessCorner 12 жыл бұрын
Watched the magic tricks at the end out of respect for quality lesson -- ended up learning another lesson. Thanks for making this -- it was really really helpful.
@say-cred
@say-cred 10 жыл бұрын
BEST EDUCATIONAL VIDEO I HAVE SEEN BEST LECTURER I HAVE SEEN AMAZING VIDEO AMAZING MAN 10/10 THANK YOU SO MUCH
@msven
@msven 11 жыл бұрын
Great stuff! Our class didn't go into the usefulness of it and now it makes SOO much more sense. Thanks!
@AshwinPraveen
@AshwinPraveen 11 жыл бұрын
I really really really enjoyed this class, He's like the liveliest teacher I've ever known!!!!
@TheShagans
@TheShagans 11 жыл бұрын
This was extremely helpful. Always nice to have that crazy teacher liven things up.
@tomken5919
@tomken5919 7 жыл бұрын
Finally understand pointers now thankyou!!! Only lecture able to explain the purpose of pointers.
@MineCrafterCity
@MineCrafterCity 9 жыл бұрын
I thought this would be difficult to understand, but you explain very well. thanks!
@JeebuJacobThomas
@JeebuJacobThomas 10 жыл бұрын
Excellent way of teaching... Not just pointers.. but infact anything for that matter!
@CanadianMang
@CanadianMang 11 жыл бұрын
Finally I understand pointers! This is a very good teacher.
@joch3085
@joch3085 10 жыл бұрын
This is way clearer than the lecture I had today about pointers.
@ffhabdull3309
@ffhabdull3309 10 жыл бұрын
wish i had a teacher like him
@revanthkumar7059
@revanthkumar7059 9 жыл бұрын
Awesome.. The best teacher in world
@FatmirSaiti
@FatmirSaiti 11 жыл бұрын
This is the best professor I've seen so far! And I've seen a lot. I'm 35 and still studying, so go figure it :)))
@heXXXorDude
@heXXXorDude 8 жыл бұрын
guys... sshhh shhhhh :)
@KomalNarang021
@KomalNarang021 10 жыл бұрын
the statement printf("%d",*7); near 10:00 won't work...because it is referring to value of 7. It should be an address. To make the things easy just modify your jargon for pointers a little bit. 1. call the * operator value of operator 2. call the & operator address of operator. for example: int a =10; printf("%d",*(&a)); now solve it with new jargon. Read it loud "content of address of a".
@KomalNarang021
@KomalNarang021 10 жыл бұрын
***** First of all technically this statement is not correct because here we are referring to value stored at address 7 which is not possible. We can not access the memory directly. As an example it is fine but can be confusing for beginners. By the way my bad, in my previous comment I thought 7 is value not the address. But still it is not a valid statement.
@jpkfox
@jpkfox 10 жыл бұрын
***** It is a bit wrong way to say *7 or put a star in front of an integer variable as in C language its an illegal operation (a compiler would not compile that, its a syntax error). with: int *p = 7; it would work because p is able to take the value from the location 7 as it is a pointer variable and pointer variables are able to go to the address and modify/get its value. Integer is not able to do that (*7). Maybe he could say: lets define a new language where @ in front of an integer returns the the content of the memory location. Then @7 would do the job. And after that he could go and show it with C++ using int *p, and setting p = 7. But I do not think this is a major issue as its correct as an idea, but its not correct C++ syntax. But I like how enthustiasticly he is teaching. Its good to be enthustiastic what you do.
@dhruvsb3161
@dhruvsb3161 8 жыл бұрын
This guy reminds me of Walter White
@pradyu73
@pradyu73 7 жыл бұрын
lol. thats true.
@shubhamkulkarni272
@shubhamkulkarni272 7 жыл бұрын
yes. me too :D
@jonathankim1999
@jonathankim1999 6 жыл бұрын
This guy is amazing! He makes things so easy to understand. Good refresher.
@LUX1111111111111
@LUX1111111111111 10 жыл бұрын
this guy is so talented in teaching!
@PrimitiveBaroque
@PrimitiveBaroque 10 жыл бұрын
hands down the best video on pointers. amazing lecture
@tanjagray9954
@tanjagray9954 5 жыл бұрын
Brilliant. Thank you so much. I've gone over the lecture material for my own uni so many times trying to grasp this. That was so clear.
@harai6063
@harai6063 6 жыл бұрын
i love professor voice and his teaching style.
@RevolutioZ
@RevolutioZ 11 жыл бұрын
Wow, this guy propably made me find what im going to do after high school! Programming is so interesting!
@swatisharma765
@swatisharma765 6 жыл бұрын
If only we had teachers like you! Thanks a ton for this!!!
@a1arjun02
@a1arjun02 11 жыл бұрын
I feel exactly the same way, I studied computer science @ University of Hertfordshire. Complete SHAM, no C taught what so ever. All I learned was JAVA. Working as a Telecoms Engineer in embedded development. I find my self struggling, however this video cleared pointers up for me Thanks you Sir
@EngRona
@EngRona 11 жыл бұрын
Oh my God,,amazing;thanks is a very little word ;thank you very very very very much; God bless and guide you Rana from Egypt
@AdvaTced
@AdvaTced 5 жыл бұрын
One of the best guides, subscribed to this channel!
@myonlynick
@myonlynick 7 жыл бұрын
introduction to the concept of pointers. Cool video.
@Nockoutz1
@Nockoutz1 4 жыл бұрын
This really helped me understanding pointers , I wish I had teachers like this guy.
@lub094
@lub094 13 жыл бұрын
i've watched a lot tutorials about pointers and i haven't understood them till now, THANKS !
@Foaman
@Foaman 2 жыл бұрын
It would be easier to understand if the chalk were better. By the time he got to x, I didn't know that x was assigned to 2 because I didn't see the flowline encircling 2 and x.
@b992152
@b992152 11 жыл бұрын
Wow, come now, this guy is fantastic! I wish I could have a king of education like they have!
@kadersniper
@kadersniper 10 жыл бұрын
this is the best tutorial ever i know how pointers works now thanks Richard
@flipsider87gnx
@flipsider87gnx 15 жыл бұрын
Great explanation of pointers :)
@videos2laugh961
@videos2laugh961 6 жыл бұрын
good lecture!! like the magic :) His passion is just awesome
@rickyoswald
@rickyoswald 13 жыл бұрын
@axelasdf The pointer is the first element of the array. You can fall off the end of the array (into other memory). I think stopping it falling off the end is a compile-time trick, but I am not 100% certain of that.
@king38344
@king38344 14 жыл бұрын
Awesome style of teaching, learning made fun.... Thank you Mr.Richard :)
@P_S_42
@P_S_42 11 жыл бұрын
my prof just read his code out loud for 60 mins without explaining it... thank you for uploading this.
@bondservant4Him
@bondservant4Him 12 жыл бұрын
It depends on your coding style.. Ive worked with some C programmers who would instinctively only dereference stucts with (*list).push_back() to stay consistent with dereferencing more basic pointers. It all boils down to style.
@onjofilms
@onjofilms 12 жыл бұрын
Title is a misnomer. Should be 'Basics on Pointers'. Did not cover protecting array constants with 'const', pointers to multi-dimensional arrays, pointer addition (which he states), pointer compatibility, and was weak on declaring and assignment of pointers. On the plus side, he was not boring, and did cover the basics with good visualization.
@RajuAjish1
@RajuAjish1 12 жыл бұрын
This is how they really teach!!!? Wow! It's so much fun.
@naruto-4990
@naruto-4990 8 жыл бұрын
at 14:58 if we print &x (where x = 2 also there is a 2 in cell no 1) we get the result as 10 but if we try print &6 as seen 16:18 we cant do it?, i am so confused can somebody explain?
@bondservant4Him
@bondservant4Him 12 жыл бұрын
not if you dereference it, in fact it makes more sence to declare it int *i because you will rarely call it by i except in the beginning when you point it somewhere.
@0ldfashi0ned
@0ldfashi0ned 11 жыл бұрын
This dude is absolutely brilliant!!! Wonderful explanation!
@SAURABHJAIN1989
@SAURABHJAIN1989 5 ай бұрын
At 13:55 How *2 is 4? *2 should give the address of variable 2 (x) and that should be 10. As x was pointing to the value 2 at &x, 10. Isn't it?
@Ahliddin007
@Ahliddin007 14 жыл бұрын
Thank you very much Richard! You really know the good way of teaching!
@GGShinobi77
@GGShinobi77 11 жыл бұрын
what an enthusiastic performance! you can see he's doing it with passion and is having fun. An excellent teacher. :) And also thanks a lot! I've always felt that the use of * was inconsistent in C, thought that it was different when used in declarations compared to the rest of the program - until that great explanation! :))
@hikkenwayans
@hikkenwayans 8 жыл бұрын
EXCELLENT lecture!!!
@Samsemillya
@Samsemillya 11 жыл бұрын
I´m coming from germany, and my english isn´t that good, but to be honest i understand everything ! Really nice Teacher !!!
@say-cred
@say-cred 10 жыл бұрын
I ACTUALLY LOVE THIS MAN.
@rmis198
@rmis198 11 жыл бұрын
great personality.. Richard sir you are awesum
@DragonLowStar1
@DragonLowStar1 10 жыл бұрын
Lol, this man can teach!
@onlylikenerd
@onlylikenerd 9 жыл бұрын
Thanks
@Zack-xz1ph
@Zack-xz1ph 5 жыл бұрын
onlylikenerd it's you???
@tressaortiz2078
@tressaortiz2078 2 жыл бұрын
Not the professor talking about a SARS outbreak from Hong Kong 12 years before COVID. really tripped me out to hear lol
22: The most important thing - Richard Buckland UNSW
57:10
UNSW eLearning
Рет қаралды 60 М.
Master Pointers in C:  10X Your C Coding!
14:12
Dave's Garage
Рет қаралды 296 М.
Fast and Furious: New Zealand 🚗
00:29
How Ridiculous
Рет қаралды 48 МЛН
A little girl was shy at her first ballet lesson #shorts
00:35
Fabiosa Animated
Рет қаралды 21 МЛН
Kids' Guide to Fire Safety: Essential Lessons #shorts
00:34
Fabiosa Animated
Рет қаралды 11 МЛН
Lecture 24: eXtreme Programming - Richard Buckland
44:48
UNSW eLearning
Рет қаралды 142 М.
Lecture 35: Linked Lists - Richard Buckland UNSW
44:28
UNSW eLearning
Рет қаралды 133 М.
Essentials: Pointer Power! - Computerphile
20:00
Computerphile
Рет қаралды 463 М.
Pointers and dynamic memory - stack vs heap
17:26
mycodeschool
Рет қаралды 1,4 МЛН
Lecture 45: What makes a good programmer? - Richard Buckland UNSW
55:09
C++ Pointers - Finally Understand Pointers
15:56
Caleb Curry
Рет қаралды 210 М.
WHY IS THE HEAP SO SLOW?
17:53
Core Dumped
Рет қаралды 215 М.
Lecture 3: Machine Code - Richard Buckland UNSW
55:55
UNSW eLearning
Рет қаралды 110 М.
Lecture 2: Inside a computer - Richard Buckland UNSW
59:36
UNSW eLearning
Рет қаралды 146 М.
Lecture 8: writing a simple C program  - Richard Buckland
1:01:09
UNSW eLearning
Рет қаралды 87 М.