21:Everything u need 2 know about pointers -Richard Buckland
Why Stack Overflow recommends it
Stack Overflow users link it when answering how to understand pointers in C, calling it a clear classroom explanation of indirect addressing and the & and * operators.
Recommended by 4 people across 3 different months, 2009 to 2019.
What it is
A university lecture by Richard Buckland at UNSW reviewing pointers and indirect addressing in C, including pass by value versus pass by reference and passing arrays into functions. It also touches on dynamic data structures, abstract data types, and the start of a sudoku solver design.
What people said
Strong rec EvilTeach · 2009-02 · Stack Overflow · on “How to Approach Pointers in C?”
If you really want to understand pointers, You need a good college lecture. The best one I have ever seen is this one [this video] . Nothing else compares. Also check out the lecture on Turing. It is very well done.
Strong rec Jon · 2009-02 · Stack Overflow · on “How to Approach Pointers in C?”
A somewhat unconventional suggestion: [this video] It's a lecture from Higher Computing 1 at my uni from last year. The first few minutes will be a bit useless (subject admin type stuff), but otherwise it's a really good explanation
Recommends Andrioid · 2009-05 · Stack Overflow · on “Where are the best explanations of variables, pointers, references and memory addresses on the net?”
I'm studying engineering and we had this little crash course in C and went through this book called "How to program C" by Deitel. It covers all the basics and has a few code samples in it. However; Pointers can be tricky to get, especially from only reading about them. I strongly recommend this lecture by Richard Buckland about pointers [this video] . Then of course, just start experimenting. It is the best way to learn this subject.
Recommends user6288471 · 2016-07 · Stack Overflow · on “Pointers in C: when to use the ampersand and the asterisk?”
I was looking through all the wordy explanations so instead turned to a video from University of New South Wales for rescue.Here is the simple explanation: if we have a cell that has address x and value 7 , the indirect way to ask for address of value 7 is &7 and the indirect way to ask for value at address x is *x .So (cell: x , value: 7) == (cell: &7 , value: *x) .Another way to look into it: John sits at 7th seat .The *7th seat will point to John and &John will give address /location of the 7th seat . This simple explanation helped me and hope it will help others as well. Here is the link for the excellent video: click here. [this video] Here is another example: #include <stdio.h> int main() {
Cites mars · 2013-08 · Stack Overflow · on “Return 2d array from C++”
I trust that you already have looked at c++ books ( [LINK] ) regarding pointers, so I'll throw in a link to a C lecture from R. Buckland (caution: C and C++ are different languages, sometimes the difference is very subtle, but the concept of pointers works the same way): [this video] The iterators of the standard containters behave like pointers would and the containers behave a bit like arrays, but the container takes care of memory management and bounds checking.
Cites Ezequiel Barbosa · 2015-06 · Stack Overflow · on “Is this way of using indirect addressing correct?”
I'm watching a college lecture about direct and indirect reference. The professor just said that you can access a determined address by putting * and the address ahead of it. In the example he gave printf("%d", *7); will print the value in the memory address 7. That doesn't happen to be true, at least it didn't work at all for me. For example, I had a variable num at address 0x28cc48 or 2673736 . When I do *b = &num , I can access the variable's value with printf("%d", *b); , but If I try printf("%d", *2673736); or printf("%d", *0x28cc48); that won't work. Here's the lecture, for those who want to check it: [this video] I don't know, I think his explanation is broken, but it may be that I'm missi
Cites simon · 2016-08 · Stack Overflow · on “C++ Incrementing a Pointer”
I am not sure why this is getting down voted. I was following alongside this video @ 31:25 is the reference to the code above: [this video]
Cites Umair Abid · 2018-10 · Stack Overflow · on “Cannot access member of an object via pointer”
@RemyLebeau comment was spot on and pointed out the exact problem. So here is the solution. Problem Background So I had a pointer to an object of type Node aNode and had a function insert(Node *node, int x) . I wanted the function insert to check if given pointer to node doesn't point to anything then create a new node and set the reference in provided node. The expectation was that after setting the reference aNode will point to the newly created node as well. However it was a false expectation because I was passing the pointer by value instead of reference which meant node in the function insert was a different one than aNode Buggy Solution So the solution was to pass reference of aNode to
Cites sobha · 2019-05 · Stack Overflow · on “Is there any real world application of indirect addressing in some software using programming language like C?”
I was watching this tutorial [this video] and this guy tells about indirect addressing using pointers. He says that an address can be passed through the function call in main function which can be collected at the function definition by pointer variables. So that we can change the value of variable that are inside main function. How is this useful in real case scenarios? Doesn't this be misused if some one uses this for programming in real case software building. Please enlighten me. Can anyone please give me an example of real world example where indirect addressing is used in software architecture? main() { int var1; function1(int &var1) } void function1(int *var1){ *var1=*var1+1; }