General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
xybersurfer
Computerphile
comments
Comments by "xybersurfer" (@xybersurfer) on "Triple Ref Pointers - Computerphile" video.
Neil Roy no. in C, a string is just a pointer to a character. the characters are stored next to each other in memory (they are an array). to get a pointer to the next character you can increment the pointer to the character using: p++; or you could cast it into an array and use an index on this array, to get the character you want: c = arr[i] because arrays in C are basically pointers
2
Ivar Kråbøl i can see where why you think that. but if you see the black part going from "beer" to chips as a value pointing chips, then it is correct that it now belongs to "burgers". because "burgers" is now pointing to "chips". the yellow part is a new pointer value. i think you would have been correct if he took the blue block from "beer" and used it as the blue block for the new "burgers" thing
1
very interesting code. i didn't understand how intuitive it was until i saw it. but it has some issues
1
WayToAesthetic yes and i think that would be a more efficient solution. i think he was going for the least amount of variables to make it intuitive
1
Anshul Mittal a pointer is a memory address of data. in the previous video, the data was the "Thing" "object". this is called a pointer to a "Thing". in this video he also used a pointer to a pointer to a "Thing"
1
Joshua Hillerup i think they are exactly the same. it's more convenient to insert something into the front of a singly-linked list than into the back, because inserting into the back would require going through the whole list. so people tend to keep these lists reversed as long as possible so they can insert things into the front efficiently. that's why you see a lot of reversed lists. usually people reverse the list when they are done, to give it the correct order again. the exact same problem exists with the singly-linked lists in this video
1